Implement JWT auth in NestJS the idiomatic way
Wann einsetzen: You need JWT with refresh tokens and don't want to wire up the passport modules from scratch.
Voraussetzungen
- NestJS project — nest new my-app
Ablauf
-
Request the implementationUse the NestJS skill. Add JWT auth with refresh tokens to this project.✓ Kopiert→ 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.✓ Kopiert→ Jest + supertest test files following NestJS conventions
Ergebnis: Production-pattern JWT auth with tests.
Fallstricke
- Claude mixes NestJS decorators with Express middleware patterns — Insist on 'NestJS idioms only — no raw Express'