kuzzleio / kuzzle-admin-console

A SPA to administrate your Kuzzle: index and collection management, document creation, realtime subscription and permissions management
http://console.kuzzle.io
Apache License 2.0
61 stars 25 forks source link

Unable to logout if token is invalid #955

Closed xbill82 closed 2 years ago

xbill82 commented 3 years ago

If the token is invalid (which happens if you restart your backend) the logout action fails and the login page is never displayed until the page is refreshed.

jsatge commented 3 years ago

I tested the logout like this:

And everything is working for me. What is the way to have this bug ?

berthieresteban commented 3 years ago

I'm able to reproduce, just stop your backend without restarting it, you won't be able to logout so you won't be able to change env nor user

jsatge commented 3 years ago

Isn't it a normal behavior if the backend is not running anymore ?

berthieresteban commented 3 years ago

Well since it stuck you in the current environment on which you can't do anything I don't think so It might be another issue but IMHO we should be able to get back to the environment selector We probably need more info here @xbill82

xbill82 commented 3 years ago

Well... Technically, @jsatge is not wrong: it makes no sense to end a session against a backend that is not responding. But, try deleting the token from Redis directly. The logout action is rejected because the token is not valid so... no logout nor login form is shown. The aim is to allow the user "just get out of here", so let's make the logout function a little bit more resilient.