The login handler never fires and I cant seem to figure why. I think it may no longer be supported?
/server/Auth.jsx
Accounts.registerLoginHandler(function(request) {
if(!(request.platform && request.fqdn)) {
return undefined;
}
var user = Accounts.findUserByEmail(request.email);
if (!user)
throw new Meteor.Error(403, "User not found");
if (!user.services || !user.services.password ||
!(user.services.password.bcrypt || user.services.password.srp))
throw new Meteor.Error(403, "User has no password set");
//sending token along with the userId
return Accounts._checkPassword(
user,
options.password
);
});
/client/lib/Auth.jsx
Meteor.signinWithPassword = function(email, password) {
const args = {
platform: Meteor.isCordova ? 'mobile' : 'browser',
email: email,
password: Accounts._hashPassword(password),
fqdn: Actions.getTenantID() || Meteor.settings.public.fqdn
};
console.log(args);
return new Promise((resolve, reject) => {
Accounts.callLoginMethod({
methodArguments: [args],
userCallback(error){
if(error){
reject(error)
}else{
resolve()
}
}
})
})
};
When I do try this the result is:
{error: "UserNotFound", reason: "Account not found", details: undefined, message: "Account not found [UserNotFound]", errorType: "Meteor.Error"}