Answer the question
In order to leave comments, you need to log in
What to do with an error in the response when leaving, invalidating the session from the site?
For reactivity, we log out at the front, clearing the state and the user is happy.
But on the back it can give an error, for example, the token has already expired or something. This is basically irrelevant. But there is also the possibility of other errors.
Is it worth trying to log out again? Send an asynchronous request again or let the user continue to use the site as an anon? It doesn't really care what's under the hood, so it improves the overall UX a bit.
There is a certain % that an error on exit can create errors on the next login because the old session is not closed, but if done correctly, a new session will be created.
At the moment, the user is waiting for a response when entering and exiting, if at the entrance the waiting is necessary to check the rights, then when exiting, I think it doesn’t matter if the server errors, right?
Answer the question
In order to leave comments, you need to log in
I really don’t understand how you can be stupid asking such a question and in moments at the same time.
Is it worth trying to log out again?So did he come out or not?
Send an asynchronous request again or let the user continue to use the site as an anon?why else request, if you can "give the user to continue to use the site as anon"? anon - there is a way out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question