Login user account on server side

Let say I have a method called connectServer on the server side:

   connectServer: function(data) {
         <check if connection has valid data.accessToken from RESTful end point>
         if (valid) {
              var userId = Accounts.createUser({"email": data.email});

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.


Hi! Did you found a solution to this problem?