Skip to content

lachiemurray/meteor-accounts-microsoft

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 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 q42: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

A login service for Microsoft accounts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.6%
  • HTML 3.4%