crugroup / spadeui

The Spade UI
37 stars 0 forks source link

UI fails silently when logged in after backend restart #46

Closed zak-nuccio closed 5 months ago

zak-nuccio commented 7 months ago

When logged into spade UI, if the backend restarts, the UI will attempt to interact with the backend with its now-outdated token, causing silent errors like not being able to view any created file processes.

Some sort of mechanism to automatically log the user out after an authentication failure would be good to fix this.

jwasala commented 6 months ago

I can't seem to reproduce it - we have already implemented such mechanism and it works fine on my local env (see video below).

However, its possible that there are some other circumstances under which it does not work as expected. Can you provide more details? A video like the one below (with Network tab opened) would be appreciated. Or, if there is some staging/production environment where this problem persists, please share a link.

(it's not visible in the video, but before i switch pages from Processes to Files, I restart the server with new secret key in the background - you can see requests failing after that, and shortly after user is redirected to login page)

https://github.com/crugroup/spadeui/assets/36052673/c7d76dc5-5a87-4e9f-87ac-83a5f618cd29

jwasala commented 6 months ago

Today I was able to reproduce this issue accidentally, after restarting the server. Turns out that permissions provider did not handle case with invalid token as expected. Will be working on this!

Ridd0 commented 5 months ago

Fixed