Answer the question
In order to leave comments, you need to log in
How to correctly authorize a user by JWT in express?
Friends, I rummaged through a bunch of articles, everywhere there are semi-examples or passport-jwt (without a refresh token), please give a link to a correct (I mean as close to production) code example for: user authorization, updating a dead token using a refresh token and protecting certain paths by checking this authorization. I will be very grateful.
Answer the question
In order to leave comments, you need to log in
There will be no such link, because NOBODY in production uses JWT for authorization (except noobs). This only exists in articles paid for by service providers (that's how Auth0 and Firebase find customers). JWT is not about authorization in the application, it is for microservices.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question