Skip to content

MERN Stack CRUD operation. Using best practices. Uses jwt-token for authentication.JWT (JSON Web Token) is a commonly used method for authentication and authorization in web applications, including those built with React. User Registration/Authentication: When a user registers or logs in to the application, their credentials are sent to the server.

Notifications You must be signed in to change notification settings

aozoragh/jwt-token-react-nodejs-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 JWT Authentication with React & Node.js

A simple and secure full-stack authentication system using Node.js + Express + JWT (backend).


✅ Features

  • 🔐 JSON Web Token (JWT) based authentication
  • 🧍 User registration & login
  • 🛡️ Protected routes (frontend & backend)
  • 🔁 Token refresh (optional)
  • 💾 MongoDB for user data (via Mongoose)
  • 🧑‍💻 Clean, modular codebase for easy understanding

🧪 How It Works

  1. User signs up → Backend saves user in DB (hashed password).
  2. On login → Backend returns JWT token.
  3. Token is stored in localStorage or HTTP-only cookies.
  4. Frontend uses token to access protected routes.
  5. (Optional) Refresh token system for prolonged sessions.

📄 License

MIT © 2025 Aozora


About

MERN Stack CRUD operation. Using best practices. Uses jwt-token for authentication.JWT (JSON Web Token) is a commonly used method for authentication and authorization in web applications, including those built with React. User Registration/Authentication: When a user registers or logs in to the application, their credentials are sent to the server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published