Answer the question
In order to leave comments, you need to log in
Adding a token to the database during Authorization how to implement?
Adding a token to the database during Authorization how to implement?
I will have registration and authorization through node js.
and now I will need to implement auto login by adding it to localStorge by token.
how to implement so that when authorizing in the token field, the generated token is recorded.
Answer the question
In order to leave comments, you need to log in
There is no need to throw a token into the database. As I understand it, you have jwt authorization, which means you just need to generate and save a token on the client (cookies, localstore) during authorization, then read this token from the user when entering the site. Read about jwt, everything is simple there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question