Let say I have a method called connectServer
on the server side:
Meteor.methods({
connectServer: function(data) {
<check if connection has valid data.accessToken from RESTful end point>
if (valid) {
var userId = Accounts.createUser({"email": data.email});
this.setUserId(userId);
}
}
});
The problem with this method is that it doesn’t seem to trigger any ‘login connection’ actions on server. I’m currently using meteor-user-status
and the event UserStatus.events.on("connectionLogin", function(fields) { ... })
is not called when this.setUserId(userId) has updated. Is there any way I can manually trigger a ‘login connection’ action on server? Thanks.
Note: I’m not using Meteor’s client, so I would like to do this on the server side.