User authentication is required for most of the platform's features. We will use JSON Web Tokens (JWT) for stateless authentication. ### Acceptance Criteria - [ ] Install `@nestjs/jwt` and `@nestjs/passport`. - [ ] Create an `AuthModule`, `AuthService`, and `AuthController`. - [ ] Create a `/auth/login` and `/auth/register` endpoint (mocking DB calls if User module doesn't exist yet, or fully integrating if it does). - [ ] Create a `JwtStrategy` that validates the token and extracts the user payload. - [ ] Create a custom `@CurrentUser()` decorator to easily grab the user from the Request object. ### Useful Resources - [NestJS Authentication Guide](https://docs.nestjs.com/security/authentication)
User authentication is required for most of the platform's features. We will use JSON Web Tokens (JWT) for stateless authentication.
Acceptance Criteria
@nestjs/jwtand@nestjs/passport.AuthModule,AuthService, andAuthController./auth/loginand/auth/registerendpoint (mocking DB calls if User module doesn't exist yet, or fully integrating if it does).JwtStrategythat validates the token and extracts the user payload.@CurrentUser()decorator to easily grab the user from the Request object.Useful Resources