Skip to content

Reset password feature and update user endpoint#27

Open
d0peCode wants to merge 32 commits into
kasvith:masterfrom
d0peCode:resetPasswordFeature
Open

Reset password feature and update user endpoint#27
d0peCode wants to merge 32 commits into
kasvith:masterfrom
d0peCode:resetPasswordFeature

Conversation

@d0peCode

@d0peCode d0peCode commented Jul 3, 2019

Copy link
Copy Markdown
Contributor

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