This repository contains a powerful User Authentication API built with ExpressJS, Passport, JWT, and MongoDB (Mongoose). The API provides essential endpoints for user registration, login, session status checks, and logout functionalities, ensuring robust security measures and seamless user experience.
- User Registration: Allows users to create new accounts by providing necessary details.
- Login: Validates user credentials and generates JWT tokens for authenticated sessions.
- Session Status Check: Enables clients to verify if a user is currently logged in.
- Logout: Invalidates JWT tokens, facilitating secure user logouts.
- ExpressJS: A fast, unopinionated, and minimalist web framework for Node.js.
- Passport: An authentication middleware for Node.js, supporting various authentication strategies.
- JWT (JSON Web Tokens): A compact, URL-safe means of representing claims to be transferred between two parties securely.
- MongoDB: A NoSQL database for efficient and scalable data storage.
- Mongoose: An elegant MongoDB object modeling tool for Node.js, simplifying interactions with the database.
- MVC Pattern: Organizes the codebase into Model, View, and Controller components for maintainability and scalability.
- Register User:
POST /auth/register
- Login User:
POST /auth/login
- Check Session Status:
GET /auth/status
- Logout User:
POST /auth/logout
- Fork it (https://github.com/tokhy1/Expressjs_User_Authentication_API.git/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
- Email: [email protected]
- LinkedIn: LinkedIn Profile
Happy Coding!