Skip to content

A sample NestJS application, demonstrating how to use JWT Authentication, with short lived access tokens, and long lived refresh token.

License

Notifications You must be signed in to change notification settings

Muhammad-waqar-uit/nestjs-auth-jwt

 
 

Repository files navigation

Nest Logo

Description

A sample NestJS application, demonstrating how to use JWT Authentication, with short lived access tokens, and long lived refresh tokens.

The architecture is opinionated, comments and PR are appreciated.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Got to http://localhost:1337/api/swagger to find the swagger doc.

Roadmap

  • Add third party providers Auth (Facebook, Google, Twitter, etc...)
  • Add Redis cache for blacklisted access tokens (for now it's in memory)
  • Update password, Lost password

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

License

Nest is MIT licensed.

About

A sample NestJS application, demonstrating how to use JWT Authentication, with short lived access tokens, and long lived refresh token.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.7%
  • JavaScript 1.3%