Skip to content

princepatel4423d/mern-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MERN Stack Authentication System πŸ”

MERN Auth Preview

This is a full-stack MERN authentication starter project that includes:

  • User Signup
  • Login
  • Email verification with OTP
  • Password reset with OTP
  • Secure password hashing with bcrypt
  • JWT-based authentication

⚑ Build faster and focus on what matters. This project saves you setup time and lets you implement custom features right away.


πŸš€ Tech Stack

  • Frontend: React, Axios, React Router, Toastify
  • Backend: Node.js, Express.js
  • Database: MongoDB with Mongoose
  • Emailing: Nodemailer
  • Security: bcrypt, JWT
  • Environment Management: dotenv

πŸ” Features

βœ… Signup

  • Register with name, email, and password.
  • OTP sent to email for verification.

βœ… Login

  • Authenticates via email and password.
  • JWT token issued on success.

βœ… Email Verification with OTP

  • Sends OTP to registered email.

βœ… Reset Password with OTP

  • Sends OTP to user's email.
  • Allows secure password reset upon OTP validation.

βš™οΈ Installation & Setup

1. Clone the Repository

git clone https://github.com/princepatel4423d/mern-auth.git
cd mern-auth

2. Setup Backend

cd server
npm install
PORT=4000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
NODE_ENV='development'
SMTP_USER=your_email@example.com
SMTP_PASS=your_email_password_or_app_password
SENDER_EMAIL=senders's_email
npx nodemon server.js

3. Setup Frontend

cd ../client
npm install
npm run dev

πŸ‘¨β€πŸ’» Connect with Me

I’d love to hear your feedback, contributions, or collaborations! Feel free to connect with me on any platform below:


πŸ“ƒ License

This project is licensed under the MIT License.

About

This is a full-stack authentication system built using the MERN stack (MongoDB, Express.js, React, and Node.js). It includes all the essential features required for a secure user authentication flow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages