-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix field name of reset password token, add verifier and set status #161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if you could add some tests directly in this PR to be sure that your changes work as intended. And to answer your question, we can keep the document in order to keep a record of the password reset.
Great work identifying this bug and fixing it 🙌
52ba887
to
bef4fde
Compare
@tomivm I think I accidentally pushed to your branch and undid some of your changes. Sorry! |
@tomivm I think I was able to restore your changes. |
0589087
to
e71200c
Compare
@tomivm I am closing this because it is too old. Could you please check it out and apply the same fix on a new branch in case this is still applicable? |
this PR fixes a bug that allows changing the password of the users of Cboard only with their emails.
-Don't send the reset password token on /user/forgot response
-Use resBcrypt variable on bcrypt.compare() callback to verify if the token is correct.
-Set the status field of the document to true after changing the password. ( It's better to use this field or delete the document? )
After this merge is necesary modify test of user endpoint because the token is no more available on forgot response. PR #144