Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/7gowtham/password-reset-flow

To implement a correct password reset flow with email verification and proper update of the new password in the database for the web app.
https://github.com/7gowtham/password-reset-flow

axios bcryptjs cors dotenv jsonwebtoken nodemailer react-bootstrap

Last synced: about 1 month ago
JSON representation

To implement a correct password reset flow with email verification and proper update of the new password in the database for the web app.

Awesome Lists containing this project

README

        

# Password Reset Flow

## Contents
- [Description](#description)
- [UserFlow](#userflow)
- [Functionalities Used](#functionalities-used)
- [API Endpoints](#api-endpoints)

### Description
This project demonstrates how to implement a correct password reset flow with email verification and proper update of the new password in the database for the web app.

### UserFlow
1. Create a user: Users can register, and their details are stored in the database.
2. The project includes a login page with a username and password field, along with a "Forgot Password" link. Upon successful login, a success message will be displayed.
3. If the "Forgot Password" link is clicked, the user is redirected to a page where they can enter their email address. After entering the email, they are redirected to a password reset page via a secure link.
4. On the password reset page, the user can change their password. After updating, they will be redirected back to the login page, where they can log in with the new password and see a success message.

### Functionalities Used
1. Utilized `react - bootstrap` to design the UI in a responsive way.
2. Utilized `axios` to make HTTP requests from a web browser or Node.js
3. Utilized `bcryptjs` for hashing and comparing the password.
4. Utilized `jsonwebtoken` to create and decode token.
5. Utilized `cors` to connect frontend and backend connectivity.
6. Utilized `dotenv` to secure the environment variables.
7. Utilized `nodemailer` a module for Node.js that allows to send emails from the server.

### API Endpoints
#### FrontEnd URL:
1. https://passwd-reset7.netlify.app/user/login

#### BackEnd URLs:
1. https://password-reset-flow-1y0d.onrender.com/user/create
2. https://password-reset-flow-1y0d.onrender.com/user/login
3. https://password-reset-flow-1y0d.onrender.com/user/forgot-password
4. https://password-reset-flow-1y0d.onrender.com/user/reset-password/:token