fix(auth): Keep a refused read of the current user from ending the session - #102
Merged
Conversation
…ssion Signing in with a legacy API key bounced the operator straight back to the login screen. The agent refuses the current-user read for an authenticated actor that has no user record, and the panel could not tell that from a session that had ended, so it discarded the token. The read now sits outside the session check, so its answer cannot end the session. A session already known dead still stops it. Removable once flatrun/agent#208 is in a release.
Deploying flatrun-ui with
|
| Latest commit: |
23522bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://131dc039.flatrun-ui.pages.dev |
| Branch Preview URL: | https://fix-users-me-session-logout.flatrun-ui.pages.dev |
Code Review SummaryThis PR addresses a UX bug where users with legacy API keys (who lack a user record in the agent) were being immediately logged out upon signing in. This was caused by the 🚀 Key Improvements
|
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.
Signing in with a legacy API key bounced straight back to the login screen: the agent refuses the current-user read for an actor with no user record, and the panel could not tell that from a dead session. Held outside the session check until flatrun/agent#208 ships.