Endpoint token lifecycle: first-class expired state with one-click recovery#5636
Merged
norman-abramovitz merged 9 commits intoJul 13, 2026
Conversation
- isTokenRejectedErr now inspects the UAA response body, not just status: a 401 disposes unless the body names invalid_client, a 400 disposes only when it names invalid_grant/invalid_token. Prevents a rotated/misconfigured client secret from wiping every user's still- valid refresh token for an endpoint. - Gate the disposal write on the token's AuthType being OAuth2, making the "OAuth tokens only" invariant true by construction instead of relying on basic-auth endpoints happening to lack a TokenEndpoint. - Floor TokenExpiry to now on disposal whenever it's 0 or in the future, not just when it's already in the future, so a disposed row with no prior expiry can't read back as healthy forever. - Add a token_expiry===0 case to computeConnectionStatus's spec documenting the 0-as-no-expiry 'connected' behavior.
Live verification found the card view rendered a blank Status for an endpoint whose connectionStatus is 'expired' - the status cell only had branches for connected/disconnected/checking. Add the expired branch (warning-toned label + reused disconnected glyph; no new icon font entry) and keep the card undimmed so it stays as noticeable as a connected one.
norman-abramovitz
approved these changes
Jul 13, 2026
norman-abramovitz
left a comment
Contributor
There was a problem hiding this comment.
LGTM - cover the bump dev
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.
Makes "expired" a first-class endpoint connection state, detected from data already on the wire, recorded in existing DB columns, reported at login and at jetstream boot, and recovered via the connect dialog. No schema migration and no background token refreshing.
Backend (jetstream)
Frontend
Verification
Closes #3311, closes #3256, closes #2972, closes #3968.