https://github.com/aneathaarse/frontend-authentication
Password reset
https://github.com/aneathaarse/frontend-authentication
axios bootstrap react-icons react-router react-router-dom
Last synced: 3 months ago
JSON representation
Password reset
- Host: GitHub
- URL: https://github.com/aneathaarse/frontend-authentication
- Owner: AneathaaRse
- Created: 2025-01-04T13:05:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-05T07:42:30.000Z (over 1 year ago)
- Last Synced: 2025-02-05T08:30:35.554Z (over 1 year ago)
- Topics: axios, bootstrap, react-icons, react-router, react-router-dom
- Language: JavaScript
- Homepage: https://frontend-authentication-five.vercel.app/
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Password Reset System
This project implements a complete Password Reset Flow using Node.js, Express.js, MongoDB, and React. It allows users to securely reset their passwords through email verification.
---
## Features
- **User Registration and Login**: Secure authentication for users.
- **Forgot Password Functionality**: Sends reset links to the user's registered email.
- **Secure Password Reset Flow**: Validates reset tokens and updates passwords securely.
- **Modern UI**: Built with React and styled using Bootstrap for a clean and responsive design.
---
## Project Workflow
### 1. Forget Password Page
- Users enter their registered email address.
- Backend checks if the email exists in the database.
### 2. Check User Existence
- **If not found**: Returns an error message.
- **If found**: Generates a secure random string.
### 3. Send Reset Link
- The random string is stored in the database and sent as part of a reset link to the user’s email.
### 4. User Clicks Reset Link
- Redirects the user to the Password Reset page on the frontend.
### 5. Validate Reset Token
- Backend verifies the reset token:
- **If valid**: Displays a password reset form.
- **If invalid/expired**: Shows an error message.
### 6. Password Reset
- Users submit a new password.
- Backend securely updates the password in the database.
---
## Technical Specifications
### Frontend
- **Framework**: React.js
- **Styling**: Bootstrap
- **Features**:
- Intuitive forms for Forget Password and Reset Password.
- Responsive design with modern styling.
### Backend
- **Framework**: Node.js and Express.js
- **Database**: MongoDB with Mongoose
- **Libraries Used**:
- `bcrypt` for password hashing.
- `jsonwebtoken` for token-based authentication.
- `nodemailer` for sending emails.
- `crypto` for generating secure random strings.