T
T
Triborg-3332020-08-22 15:07:53
Node.js
Triborg-333, 2020-08-22 15:07:53

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

1 answer(s)
S
Senbonzakuraa, 2020-08-22
@Senbonzakuraa

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 question

Ask a Question

731 491 924 answers to any question