Skip to content

Conversation

@geelen
Copy link
Collaborator

@geelen geelen commented Jul 11, 2025

WIPWIPWIP

geelen and others added 7 commits July 11, 2025 16:47
Previously, the PKCE flow stored multiple keys with timestamps (pkce_${providerId}_${timestamp})
and had complex logic to find the most recent key. This simplified implementation:

- Changes storage key format from `pkce_${providerId}_${timestamp}` to `pkce_${providerId}`
- Removes timestamp-based key sorting logic in completeOAuthFlow()
- Ensures only one PKCE key is stored per provider at any time
- Eliminates potential race conditions with multiple concurrent auth flows
- Simplifies debugging by having predictable key names

This applies to both OpenRouter and Groq OAuth flows. Also fixes TypeScript
build error by removing unused 'state' variable in OAuthCallback component.

Amp-Thread: https://ampcode.com/threads/T-12223468-a950-40a8-9d44-2e1a66e6efbe
Co-authored-by: Amp <[email protected]>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 11, 2025

Open in StackBlitz

npx https://pkg.pr.new/modelcontextprotocol/use-mcp@26

commit: a37724e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants