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