Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snehamgithub/backend-user-authentication
Backend User Authentication
https://github.com/snehamgithub/backend-user-authentication
bcrypt dotenv expressjs jwt mongoose nodejs nodemon
Last synced: 4 days ago
JSON representation
Backend User Authentication
- Host: GitHub
- URL: https://github.com/snehamgithub/backend-user-authentication
- Owner: SnehaMgithub
- Created: 2024-10-31T17:18:18.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-31T18:19:42.000Z (about 2 months ago)
- Last Synced: 2024-11-10T13:37:36.360Z (about 2 months ago)
- Topics: bcrypt, dotenv, expressjs, jwt, mongoose, nodejs, nodemon
- Language: JavaScript
- Homepage: https://backend-user-authentication.onrender.com
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Password Reset
This project implements a **Password Reset Flow** using `Node.js`, `Express.js`, `Mongoose`, and `React` on the frontend, following the described flow. The backend handles user registration, login, and password reset functionality, while the front-end provides a user-friendly interface built with `React` and styled with `Bootstrap`.
## Task Details
- **Forget Password Page**: The user enters their email address on the forget password page.
- **Check User Existence**: The server checks if the email exists in the database.
- If the user is not found, an error message is returned.
- If the user exists, a random string is generated.
- **Send Reset Link**: The random string is stored in the database and emailed to the user as part of a reset link.
- **User Clicks Link**: The user clicks the link, which takes them to a password reset page.
- **Validate Reset Token**: The random string from the link is verified.
- If valid, the user is shown a form to enter a new password.
- If the string does not match, an error message is displayed.
- **Password Reset**: After entering the new password, and the password is updated.
- If the reset is successful, the user can now log in with their new password.### 2. Technical Specifications
- **Front-End Framework**: React with Bootstrap for UI design.
- **Back-End Framework**: Node.js and Express.js for handling authentication and password reset logic.
- **Database**: MongoDB with Mongoose for data management and user authentication.## Prerequisites
Make sure you have the following installed:
- **Node.js** (v14+)
- **MongoDB** (local or cloud instance)
- **React** (for front-end)
- **Postman** or **cURL** (for API testing)# Postman Collection
You can test these API endpoints using Postman. The following link provides a Postman collection that contains all the necessary endpoints for registration, login, forgot password, and password reset functionalities.
[Postman Collection for Password Reset API](https://documenter.getpostman.com/view/39168825/2sAY4vgND2)