Skip to content

Deepak356575/Auths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authentication API

API built with Node.js, Express, and MongoDB that handles user authentication with JWT tokens.

Features

  • User registration and authentication
  • JWT-based authentication
  • Protected routes
  • Secure password hashing
  • Cookie-based token storage
  • Error handling
  • Input validation
  • MongoDB database integration

Tech Stack

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - Database
  • Mongoose - MongoDB object modeling
  • JWT - JSON Web Tokens for authentication
  • bcryptjs - Password hashing
  • cookie-parser - Cookie handling
  • dotenv - Environment variable management

API Endpoints

//User Registration

  • /api/auth/register

//User Login

  • /api/auth/login

//User logout

  • /api/auth/logout

//Get profile information

  • /api/auth/profile

Postman Api Documentation --- https://documenter.getpostman.com/view/39963289/2sAYHxoPdP