Accounts Microsoft meteor package
A login service for Microsoft accounts
Getting started
Add the package to meteor
1meteor 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:
1Meteor.loginWithMicrosoft({ 2 requestOfflineToken: true, 3 requestPermissions: ['wl.emails'] // Permission scopes are found here: https://msdn.microsoft.com/en-us/library/hh243648.aspx 4}, function(error) { 5 if (error) { 6 console.error('Login failed:', error.reason || error); 7 } 8 else { 9 console.log('Logged in!'); 10 } 11});
You can also use the Meteor accounts-ui package so you only have to add;
{{> loginButtons}}
to your HTML.
Options object
1var options = { 2 // Whether or not to fetch a refresh token 3 requestOfflineToken: true, 4 // Permission scopes. 5 // All possible scopes are found here: https://msdn.microsoft.com/en-us/library/hh243648.aspx 6 requestPermissions: [], 7 // Whatever paramteres you want to give to the authentication url. 8 // All possibilities can be found here: // https://msdn.microsoft.com/en-us/library/office/dn659750.aspx 9 loginUrlParameters: [], 10 loginStyle: "popup" or "redirect", 11 redirectUrl: "" 12}