Skip to content

Auth module for handling JWT's with Nestjs and Passportjs

License

Notifications You must be signed in to change notification settings

mrcn04/tokenizer

Repository files navigation

tokenizer

A good way of handling access tokens and refresh tokens with Nestjs and Passportjs by using Prisma as the ORM, PostgreSQL as the Database and Argon as the hash method.

The reason I use Argon instead of Bcrypt is that Bcrypt is only good for passwords that have less than 74 bytes. Since our refresh token is a JWT, it will be longer than 74 bytes.

Installation

yarn

and for Prisma

yarn prisma generate
yarn prisma db push

After this, just copy the variables in .env.example to .env.

How to Run

Start the Database
docker compose up
Then start the app
yarn start:dev

About

Auth module for handling JWT's with Nestjs and Passportjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published