tokhy1 / Expressjs_User_Authentication_API

This repository hosts a robust User Authentication API developed with ExpressJS, Passport, JWT, and MongoDB (Mongoose). It offers fundamental endpoints for user registration, login, session status checks, and logout, ensuring secure authentication and user convenience.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExpressJS User Authentication API

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.

Features:

  • 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.

Technologies Used:

  • 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.

API Endpoints:

  • Register User: POST /auth/register
  • Login User: POST /auth/login
  • Check Session Status: GET /auth/status
  • Logout User: POST /auth/logout

Contributing

  1. Fork it (https://github.com/tokhy1/Expressjs_User_Authentication_API.git/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Contact

Happy Coding!

About

This repository hosts a robust User Authentication API developed with ExpressJS, Passport, JWT, and MongoDB (Mongoose). It offers fundamental endpoints for user registration, login, session status checks, and logout, ensuring secure authentication and user convenience.


Languages

Language:JavaScript 100.0%