How can i validate username and password and return user document on sever side?
Try this.
let result = Accounts._checkPassword(user, password);
1 Like
I try that method by do like this Accounts._checkPassword(email, password)
and my login information is like ‘email: super@rabbit.com, password: super123’. And i got this error ```TypeError: Cannot read property ‘password’ of undefined``
You need to get user information before call Accounts._checkPassword.
let user = Accounts.findUserByEmail(email);
let result = Accounts._checkPassword(user , password);
1 Like