I was wondering what is the best way to handle logout failure in website.
Like, I have a case where the server returned error when trying to verify user session. And in turn, this should force logout user. However, apparently there's a problem in the server, so when I call the logout API, it returned with error, making the process failed.
So, now the user session is in limbo. Since their session is invalid, they should not be able to access certain features (ie. user profile). But, on the other hand, the server cannot correctly logout the user (properly ending the session).
Of course, I could clear the local data (cache, local storage, etc) and that would at least treat them as non-login users in the site. The user won't notice that the logout failed or anything, they just think it's a success logout. But is that okay?