AuthX

AuthX

Working

A complete MERN stack authentication system with secure user registration, login, email verification, and password reset functionality.

Key Features

  • Secure JWT Authentication: Handled user login and protected API routes using stateless JSON Web Tokens.
  • Automated Email Flows: Integrated Nodemailer with Mailtrap for sending account verification and password reset emails.
  • Password Cryptography: Ensured database security by salting and hashing user credentials with Bcrypt before saving to MongoDB.
  • Modular Architecture: Structured the backend cleanly with separate controllers, routes, and custom middleware for scalability.

Challenges Faced

  • Stateless Security: Figuring out the safest way to issue and validate tokens without exposing the application to common security vulnerabilities.
  • Reliable Email Testing: Initially struggled with local email delivery getting blocked, which I solved by configuring Mailtrap to catch and test outgoing messages securely.

Key Learnings

  • Token Lifecycles: Deepened my understanding of how JWTs are signed, verified, and used to maintain stateless user sessions.
  • SMTP Integration: Learned how to configure Node.js to communicate with external email servers for transactional emails.
  • Middleware Logic: Mastered writing custom Express middleware to intercept requests and verify authentication status efficiently.
AuthX | Harshit Parmar