Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nbaua/nest-mongo-auth-starter

A starter code for NestJS REST API using Mongoose, implements the authentication guards.
https://github.com/nbaua/nest-mongo-auth-starter

authentication best-practices mongodb mongoose nestjs nestjs-backend starter starter-template

Last synced: 1 day ago
JSON representation

A starter code for NestJS REST API using Mongoose, implements the authentication guards.

Awesome Lists containing this project

README

        

## NestJS-Mongo Authentication Starter

A starter code for NestJS REST API authentication using Mongo(ose/DB), aiming at quick start on the project, Being the authentication is a most tedious activity for any project. This starter code allows you to focus on the other project aspects.

This repository contains the following features.

- As NestJs FW project, a separation of concern is always present
- Implements the JWT based authentication using passport middleware
- Implements custom guards and strategies.
- Global Validation Pipe supported with option to override the same with custom validations.
- CORS Enabled and Logged operations with Nest console logger.
- Minimal implementation, allowing you to extend the project the way you want.

### You would require to create .env file in the project root with the following entries

```
MONGO_URI=mongodb://localhost:27017/
JWT_SECRET=

```