Hi, i have a android native project and i’ m using the android-ddp for comunicate with meteor server.
The library not has the facebook login so i’m trying to do it manually.
In my meteor project i created a method like this:
let user = Accounts.updateOrCreateUserFromExternalService('facebook', params, {});
var stampedToken = Accounts._generateStampedLoginToken();
var hashStampedToken = Accounts._hashStampedToken(stampedToken);
this.setUserId(user.userId);
Meteor.users.update(user.userId,
{$push: {'services.resume.loginTokens': hashStampedToken}}
);
user = Meteor.users.findOne(user.userId);
It seems work but when i restart (in debug mode) my projects (android or meteor) the session user is lost. With the normal login persists.
How can i do?
Thanks!