https://github.com/0x4bd0/nestjs-auth-module
Basic auth authentication nestJs module, using Jwt and password hashing.
https://github.com/0x4bd0/nestjs-auth-module
auth authentication authorization jwt jwt-auth jwt-authentication jwt-token jwt-tokens nest nestjs nestjs-backend
Last synced: about 2 months ago
JSON representation
Basic auth authentication nestJs module, using Jwt and password hashing.
- Host: GitHub
- URL: https://github.com/0x4bd0/nestjs-auth-module
- Owner: 0x4bd0
- Created: 2021-02-09T16:05:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-09T16:47:53.000Z (over 5 years ago)
- Last Synced: 2025-06-25T14:52:47.099Z (12 months ago)
- Topics: auth, authentication, authorization, jwt, jwt-auth, jwt-authentication, jwt-token, jwt-tokens, nest, nestjs, nestjs-backend
- Language: TypeScript
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- NestJs Auth module with Jwt and password hashing
## Get started :
- Go to src/app.module.ts and add your mongoDB Connection URL
## Needed Packages :
```bash
$ npm install --save @nestjs/passport passport passport-local
$ npm install --save-dev @types/passport-local
$ npm install --save @nestjs/jwt passport-jwt
$ npm install --save-dev @types/passport-jwt
$ npm install --save mongoose
$ npm install --save class-validator
$ npm install --save @nestjs/mongoose
$ npm install --save @nestjs/bcrypt
$ npm install --save class-transformer
```
## Endpoints :
1- Login : '/auth/login'
- Request Body : { email, password }
2- Register : '/auth/register'
- Request Body : { email, password,username}
3- Test auth access : '/auth/jwtTest'
- Request Headers : { Authorization : Bearer + access_token }
Read more about Authentication Here