A few days ago this was working perfectly on my app, Facebook, Twitter and Google+. So, we asume all ID are the corrects ones.
I can login but I have no access to user info now, just to _id of user.
Today it wasn’t working and after a while I decided to start from scratch taking another ways.
We’re going to focus on Facebook login (all of them are kind of the same).
This is my account.js
under server folder (I’ve created this file but it was working without it):
ServiceConfiguration.configurations.remove({
service: "facebook"
});
ServiceConfiguration.configurations.insert({
service: "facebook",
appId: ID,
secret: ID
});
In my controller:
Meteor.loginWithFacebook({
requestPermissions: ['user_friends', 'public_profile', 'email'] // --> new stuff, was working before without this
}, (err) => {
if (err) {
throw new Meteor.Error("Facebook login failed");
} else {
//var user = Meteor.user();
//user.username = user.profile.name; --> this is just _id so I get an undefined issue
//state.go('food');
}
});
Running Meteor.users.find().fetch()
after login I only get this:
Object {_id: "CSRDT5WKSYMLaQnoY"}
Am I missing something?
Thanks in advance