S
S
Sergey Bondarenko2019-09-14 18:32:26
Frontend
Sergey Bondarenko, 2019-09-14 18:32:26

Vue auth, what to do with a valid token that came from the server?

Good evening!
Explain to me what to do with a positive token that came from the server?
Let's say I have a login form, you can enter a login and password there, after entering the necessary values ​​​​in the fields, authorization takes place, the server accepts the values, compares them from the database, if everything is ok, then it issues a valid token to the front. Then I don’t understand what to do with this valid token, save it in memory? No-no-ma-yu, please explain to me, as a front-end teapot, what to do with it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2019-09-14
@lietryit

Store the token in a cookie
Or in localstorage.
You just need to make sure that this very token does not have power, speaking from another browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question