Mixer account login for Meteor
cd <your-meteor-project>
meteor add service-configuration
meteor add lorikarikari:accounts-mixer
Register your app at the Mixer Developer Lab website - https://mixer.com/lab/oauth
Fill out the given form, for e.g. localhost :
http://localhost:3000
localhost
After registration add your client id and client secret to settings.json.
Create accounts.js
in the server folder and add the following code:
ServiceConfiguration.configurations.remove({
service: "mixer"
});
ServiceConfiguration.configurations.insert({
service: "mixer",
clientId: "Meteor.settings.private.<your-client-id>",
redirectUri: Meteor.absoluteUrl() + '_oauth/mixer?close',
secret: "Meteor.settings.private.<your-client-secret>",
loginStyle: "redirect"
});
Meteor.loginWithMixer(function (err) {
if (err) console.log('login failed: ' + err)
});
const scope = ["user:details:self", "user:update:self", "user:analytics:self"];
Meteor.loginWithMixer({requestPermissions: scope}, function (err) {
if (err) console.log("login failed: " + err)
});