Coding task · NestJS course · Module 4: Authentication
Token generation service
Implement the login method in AuthService that generates an access token
Task
Complete the login(user) method in AuthService that creates a payload with sub: user.id and username: user.username, then returns { access_token: this.jwtService.sign(payload) }