Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
1. Send a registration request to your API
2. In case of successful registration, the backend server puts the user object in the database and sends you a response, for example:
3. Save the necessary data from the answer in the store. You can also write the token to LS or to a cookie.
4. After reloading the page, send a request with a token to the server, to the path, such as /validate. The server checks and if everything is OK, it answers "OK, access is allowed + user data".
With a login, the data is entered, there is a request for /login, for example, and the answer is OK + token + user data
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question