What problem does it solve?
Designing, implementing, or refactoring authentication and authorization in NestJS TypeScript backends, including JWT, sessions, refresh tokens, guards, and roles, can be complex and security-critical. This Skill automates the setup of robust auth modules and secure API endpoints, reducing development time and ensuring best practices.
Core Features & Use Cases
- Comprehensive Auth Module Setup: Create or refactor auth modules with login, signup, and logout endpoints, integrating with
UsersService and password hashing.
- JWT & Token Management: Implement JWT access tokens (and optional refresh tokens) using
@nestjs/jwt and passport-jwt for stateless API authentication.
- Role-Based Access Control (RBAC): Implement guards and decorators for role-based and permissions-based access control, securing routes at class or method level.
Quick Start
Implement JWT login and protect /admin routes in this NestJS app, adding signup, login, and me endpoints, and refactor our existing auth module to use guards and decorators cleanly.