Answer the question
In order to leave comments, you need to log in
How to make user authorization using Authorization header in node.js?
Hello!
As I understand. When the client accesses the server for the first time, we send him the generated token, which we save in the session. On each request, the client sends the same token in the Authorization header. On the server, we check if the token from the header matches the token from the session.
Please tell me, is this how it works?
Thanks
Answer the question
In order to leave comments, you need to log in
I would use https://www.npmjs.com/package/passport-http-bearer
Usage
example: https://github.com/passport/express-4.x-http-beare...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question