How Do I Add Linkedin Login To Meteor?
I have tried both pauli:accounts-linkedin and jonperl:linkedin packages in combination with accounts-base & accounts-oauth. I tried it with and without accounts-ui. My Facebook
Solution 1:
That's the problem with third party login without the Mdg support, you cannot know which one will work, test more packages an can asure you that one will work
Solution 2:
So the way I made it eventually work is with the pauli:accounts-linkedin package. Accounts-UI package doesn't work, so just build your own login button:
in html:
<button id="loginBtn">Login with LinkedIn</button>
in javascript:
Template.loginTemplate.events({
'click #loginBtn':function(){
Meteor.loginWithLinkedIn({
requestPermissions: ['r_basicprofile','r_emailaddress']
}, function(err){
if(err){
console.log('error with login is: ', err);
}
});
}
});
the permissions are to be found on the developer page of linkedin. Last step now is to add the following document to the meteor_accounts_loginServiceConfiguration collection:
{
"_id" : "J2LPm7ocGfzuiK9J2",
"service" : "linkedin",
"clientId" : [clientID from linkedin developer page],
"secret" : [secret from linkedin developer page]
}
Post a Comment for "How Do I Add Linkedin Login To Meteor?"