N
N
Neuro2020-08-02 06:06:16
JavaScript
Neuro, 2020-08-02 06:06:16

Why is the passport-jwt strategy needed in nestjs?

Good afternoon, I am writing authorization and further user authentication on nestjs, the documentation recommends the passportjs library and using token verification using AuthGuard which calls the validation method from the Strategy class,
but I have a question, why and why use strategy if the token can be validated using NestMiddleware which covers all routes?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question