Is it possible to log a user in from the server side? I am trying to create a url where an external service/app can login to the meteor server.
I tried doing the following:
Meteor.call('login', {
password: data.password,
user: {
email: data.email
}
}, function (error, result) {
console.log(error);
console.log(result);
});
When called with invalid data such as an email that does not exist or an incorrect password I receive proper error messages like Incorrect Password
. But has soon as it is a valid email and password that does exist on the database I receive the following error [TypeError: Cannot read property 'id' of null]
So what I would like to know is 1) Can I log a user in on the server with this meteor call and 2) Am I doing it properly or is there another way?