fix: recover stale dynamic OAuth client registrations - #305
Open
piyushmor wants to merge 7 commits into
Open
Conversation
Author
|
fixes #299 |
Author
|
@geelen please help me with this PR. would really make my local setup very stable. |
added 6 commits
July 28, 2026 13:38
kadondibetty
approved these changes
Aug 9, 2026
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.
Summary
Make dynamic OAuth authorization resilient when several local MCP clients or proxy processes start at once. The proxy recovers the affected server automatically without deleting unrelated credentials or requiring a restart.
client_idresponses (for example,unknown client_id), clear only that server’s dynamic registration/tokens/transaction, re-register once, and retry.state, verifier, creation time); only its matching callback may exchange a code. Stale or expired callbacks are rejected.-32001while authorization is in progress. Recovery failures clean up the active round so a later request can start a fresh flow; failures no longer permanently poison the proxy.dist/bundle so Git-archive installations contain runnable package artifacts.Validation
corepack pnpm test:unit— 157 testscorepack pnpm checkcorepack pnpm buildExpected behaviour
When consent is needed, one browser authorization window opens per MCP server. Other clients receive a retryable pending response and can retry after authorization completes. Subsequent client starts reuse the persisted authorization without another login.