Skip to content
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

Reset password feature and update user endpoint #27

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

d0peCode
Copy link
Contributor

@d0peCode d0peCode commented Jul 3, 2019

This PR contains following:

  • reset password endpoints which expect to get email and send mail with randomly generated password.
    • router.post('/resetStart', auth(), userController.reset.sendMail) send email
    • router.get('/resetConfirm', userController.reset.updatePass) (entered from link in mail) confirm password change
  • update user endpoint*
    • router.put('/update', validator(update), auth(), userController.update)

*With security in mind I don't allow to update every field. I've created validation with Joi which allow only password and name change. However it can be easily configure by other developer to his own need.

@kasvith kasvith added the enhancement New feature or request label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants