Classify non-conform OAuth refresh rejections and stop retrying dead grants - #1507
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | ea12e5b | Commit Preview URL Branch Preview URL |
Jul 30 2026, 08:32 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | ea12e5b | Jul 30 2026, 08:33 PM |
RhysSullivan
marked this pull request as ready for review
July 30, 2026 20:35
Contributor
Cloudflare previewTorn down — the PR is closed. |
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.
Some authorization servers return refresh-grant rejections in a non-spec error envelope (e.g.
{"errors": ["invalid_grant - ..."]}). The spec parser refuses the shape, no RFC 6749 code is extracted, and the definitiveinvalid_grantis classified as a transient storage failure — so the dead grant is re-sent to the AS on every proactive cycle forever, the connection never flips to expired, and the user is never told to reconnect.errorstring or providererrorsarrays) and feed it into the existing classification, soinvalid_grant→ reauth-required → expired health.provider_state(plus anexpiredlast_health); later refreshes skip the doomed token request and fail reauth-required immediately. Reconnecting rewritesprovider_stateand re-arms refresh.executor.oauth.refresh/completeandexecutor.connection.health.check/validatespans so refresh outcomes are answerable per customer.