NestJS · Junior · Question 52 of 75

How is JWT authentication often implemented in Nest?

Explanation

The guard verifies the token and attaches the user to request.user; a custom @User() decorator can read it in handlers.

Further reading

Problem with a question

NestJS · Junior · question 52

Test yourself

Take the NestJS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz