DEV Community

Cover image for Complete NestJs JWT Authentication Example with Integration and End-to-End tests!
Vladimir Agaev
Vladimir Agaev

Posted on • Updated on

Complete NestJs JWT Authentication Example with Integration and End-to-End tests!

Hi there!

I've previously created a detailed video about jwt authentication in nestjs here.

I initially was not expecting much but apparently the subject of jwt authentication is very popular. Especially when it comes to access tokens and refresh tokens. I've received a lot of comments and even a PR to my example github repository. ‎😃

I've decided to give back and spent a whole afternoon adding features to the repository showcasing how to use access tokens and refresh tokens in NestJs with INTEGRATION TESTS and END TO END tests! YAY! ‎😃 ‎😃 ‎😃

E2E Tests

Integration Tests

The repository is here: https://github.com/vladwulf/nestjs-jwts.

I think it will be a solid base for anyone who wants to learn to implement authentication with jwt as there are not a lot of resources on the subject.

The project uses Prisma, argon, a test database for integration and e2e tests with the necessary scripts.

I hope that you will find it useful.

Any feedback is welcome :)

Do no hesitate to visit Code With Vlad for more NestJs content

Top comments (0)