Closed
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This PR adds ability to gracefully handle session expiry on the frontend.
ToDos
The issue with a backend-driven approach
The first commit in this branch uses an approach based on the backend returning a cookie with the time stamp for when the cookie expires. This has some issues:
The only canonical signal for a session expiry is a 401 - everything else is an workaround. I think that's the one thing a solution should handle (then the timers, notifications and so on are nice to have).
In the global-shell context (of apps being hosted in an iframe), I can't think of a different approach of capturing 401s other than the solution here. But in general, I think this should be our approach - to detect 401s and handle them, rather than trying to infer that they happened.
Notes:
Screencast.from.2026-02-15.16-10-29.webm