Improve UX: Forbidden requests should not redirect to login page (#2270)#2271
Improve UX: Forbidden requests should not redirect to login page (#2270)#2271semekh wants to merge 1 commit intotemporalio:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@semekh for what it's worth this approach won't work: Svelte seems to handle the error after navigation. So just pushing a toast will leave the UI in an error state, you have to navigate somewhere else. As a workaround you'd need to implement expiry checking for the JWT and clearing it automatically to force the UI to present the login page. The actual fix is to fix the server so it returns a 401 error. |
This is a draft PR, trying to address #2270.
I'd like to know if the general idea is ok so that I can fix the tests, etc.