Repository navigation
fix(hub): a refused refresh logs the upstream out - #405
Merged
Merged
Conversation
An OAuth upstream whose refresh token the server refused (invalid_grant, invalid_client, unauthorized_client) kept its dead login in the keychain: the dashboard showed it logged in while every call failed with the token endpoint's error. Such a refusal now drops the login, so the dashboard says logged out and the agent is sent to log in again. A token endpoint that cannot be reached or fails otherwise changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
An OAuth upstream (seen with Linear) whose refresh token the authorization server refused kept its dead login in the keychain.
logged_inonly checks that a secret exists, so the dashboard showed logged in while every call failed with…/token refused: invalid_grant.Now
bearer()drops the login when the token endpoint refuses the refresh for good (RFC 6749 5.2:invalid_grant,invalid_client,unauthorized_client): the dashboard says logged out, and the agent gets the usual "not logged in … log in at ". A token endpoint that cannot be reached, or fails otherwise (5xx, other errors), changes nothing, so an outage logs no one out.token_requesttells a final refusal (Refused { gone }) from other failuresa_refused_refresh_logs_out(unreachable endpoint keeps the login; revoked refresh token logs out)docs/dashboard-api.mdnotes it atPOST /hub/upstreams/callNo card: a bug fix, the meaning of
logged_inis unchanged.🤖 Generated with Claude Code