Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

jonshaffer/meteor-accounts-microsoft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accounts Microsoft meteor package

A login service for Microsoft accounts

Build Status

Getting started

Add the package to meteor

meteor add jonshaffer:accounts-microsoft

Basic usage

The usage is pretty much the same as all other account packages for meteor. It's inspired by the official Accounts Google meteor package. It goes a little bit something like this:

Meteor.loginWithMicrosoft({
    requestOfflineToken: true,
    requestPermissions: ['wl.emails'] // Permission scopes are found here: https://msdn.microsoft.com/en-us/library/hh243648.aspx
}, function(error) {
    if (error) {
        console.error('Login failed:', error.reason || error);
    }
    else {
        console.log('Logged in!');
    }
});

You can also use the Meteor accounts-ui package so you only have to add;

{{> loginButtons}}

to your HTML.

Options object

var options = {
    // Whether or not to fetch a refresh token
    requestOfflineToken: true,
    // Permission scopes. 
    // All possible scopes are found here: https://msdn.microsoft.com/en-us/library/hh243648.aspx
    requestPermissions: [], 
    // Whatever paramteres you want to give to the authentication url. 
    // All possibilities can be found here: // https://msdn.microsoft.com/en-us/library/office/dn659750.aspx
    loginUrlParameters: [], 
    loginStyle: "popup" or "redirect",
    redirectUrl: ""
} 

References

Official meteor documentation

OAuth package

Microsoft REST documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published