Implement JWT auth in NestJS the idiomatic way
Когда использовать: You need JWT with refresh tokens and don't want to wire up the passport modules from scratch.
Предварительные требования
- NestJS project — nest new my-app
Поток
-
Request the implementationUse the NestJS skill. Add JWT auth with refresh tokens to this project.✓ Скопировано→ 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.✓ Скопировано→ Jest + supertest test files following NestJS conventions
Итог: Production-pattern JWT auth with tests.
Подводные камни
- Claude mixes NestJS decorators with Express middleware patterns — Insist on 'NestJS idioms only — no raw Express'