Reputation: 1304
I have built a mobile app using meteor. signUp is done using otp. I have added a forgotPassword button but not sure how to use it. I am verifying the user and using the below code to reset the password : (user is not logged in)
Accounts.setPassword(id, password, function(err, res){
if(err)
alert('try again : ' + err);
else{
console.log('suv : ' + res);
}
});
Upvotes: 1
Views: 76
Reputation: 1304
Okay. So I moved the code to server side and its working now. not sure why though, as I can call Accounts.createUser, Accounts.changePassword on the client side
Upvotes: 1