Skip to content

bushido2014/express-auth

Repository files navigation

express-auth

express-auth is a simple authentication application using Express.js, JWT, and MongoDB. It provides login functionality and route protection in a web application

Description

express-auth is a demo application that illustrates how to implement an authentication system using Express.js, JWT, and MongoDB. The project includes examples of protected routes and user session management

Features

  • Authentication with JWT
  • Route protection
  • MongoDB for user data storage
  • Clear error messages for authentication

System Requirements

  • Node.js v14 or later
  • npm (Node Package Manager)
  • MongoDB instance

Configuration

  1. Create a .env file in the root directory of the project and add the following environment variables:
    JWT_SECRET=your-jwt-secret
    MONGO_URI=your-mongodb-uri

Installation

  1. Clone this repository:

    git clone https://github.com/bushido2014/express-auth.git
    cd express-auth
  2. Install dependencies:

    npm install

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages