Skip to content
This repository was archived by the owner on Oct 30, 2022. It is now read-only.

Conversation

@iamrahulrnair
Copy link
Contributor

The workflow includes:-

  • user clicks on forgot password button
  • will be prompted to enter the email of user
  • if the email is valid, creates a JWT token ,valid for 10 minutes and send to the mail id (this need to be tested since i don't have the nodemailer acc id and password. testing will be simple just uncomment the transporter segment of code and raise a forgot password )
  • user can click on that link and reroutes to front-end reset password page,
  • user types password and confirm password then server validates by checking the jwt expiry and updates the password for user.
  • user cannot raise another request with the same token since that will be security vulnerability.

lemme know if i am missing anything,
thanks :-)

Copy link
Collaborator

@codewithvk codewithvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are doing great work. Please check the above changes!

updated controller, and removed comments
removed comments
Added middleware for rate limiting
Added a middleware which returns the rate limit function, configuration change can be addressed in a single location
Copy link
Collaborator

@codewithvk codewithvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@codewithvk codewithvk merged commit ba47389 into Code-Deeper:main Dec 17, 2021
@codewithvk
Copy link
Collaborator

@iamrahulrnair Thank you for contributing to our project. Looking forward to work together :)

@akshita-kamani akshita-kamani linked an issue Dec 17, 2021 that may be closed by this pull request
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forgot Password with JWT

2 participants