A login service for Microsoft accounts
Add the package to meteor
meteor add jonshaffer:accounts-microsoft
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.
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: ""
}