hsndmr / nestjs-auth-starter

The NestJS Auth Starter project is a starter project for NestJS that provides authentication and authorization functionality out of the box.

Home Page:https://nestjs-auth-starter.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NestJS Auth Starter

The NestJS Auth Starter project is a starter project for NestJS that provides authentication and authorization functionality out of the box. It is built on top of the popular NestJS framework and uses the mongoose library to access the database. For authentication and authorization, it relies on the powerful jsonwebtoken library, while password hashing is performed using bcrypt. Additionally, the project utilizes the xstate library for state management in authentication cases, and includes tests for all cases. With this starter project, developers can quickly set up a secure and robust authentication system in their NestJS applications.

Install the dependencies for the Nest application:

npm install

Create .env file from .env.example and:

cp .env.example .env

Open .env file and add your Mongo URI and JWT Secret

MONGO_URI=Mongo_uri
JWT_SECRET=secret

Run the application:

npm run start

# watch mode
npm run start:dev

Open api documentation:

http://localhost:3000/api

About

The NestJS Auth Starter project is a starter project for NestJS that provides authentication and authorization functionality out of the box.

https://nestjs-auth-starter.vercel.app


Languages

Language:TypeScript 99.1%Language:JavaScript 0.9%