Skip to content

Conversation

semekh
Copy link

@semekh semekh commented Aug 15, 2024

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.

Copy link

vercel bot commented Aug 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 15, 2024 9:15am

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2024

CLA assistant check
All committers have signed the CLA.

@jcrsilva
Copy link

@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.
Also, it seems that it's not just the UI that's bugged, it's also the temporal server. It handles authentication errors with a 403, never a 401; which means that if you add this patch in and the server isn't fixed, if you're logged in with an auth token that expires the UI gets borked again.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants