Implement JWT auth in NestJS the idiomatic way
Quand l'utiliser : You need JWT with refresh tokens and don't want to wire up the passport modules from scratch.
Prérequis
- NestJS project — nest new my-app
Déroulement
-
Request the implementationUse the NestJS skill. Add JWT auth with refresh tokens to this project.✓ Copié→ Claude loads the NestJS reference and produces idiomatic module structure (AuthModule, JwtStrategy, guards)
-
Add testsNow add e2e tests for the auth endpoints using the testing skill.✓ Copié→ Jest + supertest test files following NestJS conventions
Résultat : Production-pattern JWT auth with tests.
Pièges
- Claude mixes NestJS decorators with Express middleware patterns — Insist on 'NestJS idioms only — no raw Express'