R
R
riksisharakshas2019-03-12 23:41:12
JSON Web Token
riksisharakshas, 2019-03-12 23:41:12

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

1 answer(s)
C
crdrads, 2019-03-13
@crdrads

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 question

Ask a Question

731 491 924 answers to any question