Answer the question
In order to leave comments, you need to log in
Express token authorization?
How to get user data correctly?
I authorize the user, encrypt his id into a token and send it to the front, store the token in localstorage at the front and send it to headers when requesting back.
The question is what to do when the token comes to the back? I decrypt it, get the user id, then just get data by id, or do I need some other checks?
Answer the question
In order to leave comments, you need to log in
Are there any other checks needed?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question