Skip to content

🔐Implementing secure authentication using JSON Web Tokens (JWT). It demonstrates how tokens are generated, validated, and used to protect application routes and APIs. The goal is to provide a simple yet powerful reference for building stateless and scalable authentication systems.

Notifications You must be signed in to change notification settings

SAMUVELREEGAN/Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 MERN Authentication System

A full-stack authentication system built with React (frontend) and Node.js/Express + MongoDB (backend).
Supports Register, Login, JWT Authentication, Forgot Password (Email), Reset Password, and Update Password.


React Node.js MongoDB Express


⚡ Features

🔧 Backend (Node.js + Express + MongoDB)

  • User registration with email validation
  • Secure password hashing using bcrypt
  • JWT-based access & refresh tokens
  • Login / Logout
  • Forgot password with email reset link
  • Update password (old + new + confirm password)
  • Middleware for authentication & validation

🎨 Frontend (React)

  • Register, Login, Protected routes
  • Forgot Password & Reset Password pages
  • Update Password page (for logged-in users)
  • Handles backend error messages properly
  • Uses React Router v6 for navigation
  • Token stored in localStorage

🛠 Tech Stack

  • Frontend: React, Axios, React Router
  • Backend: Node.js, Express.js, MongoDB, JWT, bcrypt
  • Validation: validator (for email & password)
  • Email: Nodemailer (for forgot password email links)

📸 Screenshots Without Login: 1

2 3 4

With Login:

Git push error fix - Google Chrome 20-09-2025 06_35_17 PM Git push error fix - Google Chrome 20-09-2025 06_35_48 PM Git push error fix - Google Chrome 20-09-2025 06_36_04 PM Git push error fix - Google Chrome 20-09-2025 06_36_20 PM Git push error fix - Google Chrome 20-09-2025 06_36_36 PM Git push error fix - Google Chrome 20-09-2025 06_36_46 PM http___localhost_8000_login - My Workspace 20-09-2025 06_39_26 PM http___localhost_8000_login - My Workspace 20-09-2025 06_41_02 PM React App - Google Chrome 20-09-2025 06_43_00 PM

With Login Token:

1PNG 2

🚀 Installation

1️⃣ Clone the repo

git clone https://github.com/SAMUVELREEGAN/Model.git
cd Model

About

🔐Implementing secure authentication using JSON Web Tokens (JWT). It demonstrates how tokens are generated, validated, and used to protect application routes and APIs. The goal is to provide a simple yet powerful reference for building stateless and scalable authentication systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published