This repository contains endpoints that shows all the needed authentication mechanism in a typical Application Programming Interface for Frontend Web Applications.
All Endpoints includes all the necessary best practice in terms of validation, token rotation, consistent response structure, database connection etc.
- Login
- Logout
- Registration
- Refresh User Token
- Clone this project with
git clone git@github.com:danielokoronkwo-coder/nestjs-auth.git
- Install all the necessary dependencies with
npm install
oryarn install
- Set up environment variable by creating a .env file at the root of the project directory
- Copy the content of the .env.example and paste it in the newly created .env
- Update the .env file with the database credentials and other necessary credentials like.
- Start the development server with
npm run start:dev
oryarn run start:dev