Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Fixing oauth flow on chat example#27

Merged
geelen merged 10 commits intomainfrom
fixing-oauth-flwo
Jul 16, 2025
Merged

Fixing oauth flow on chat example#27
geelen merged 10 commits intomainfrom
fixing-oauth-flwo

Conversation

@geelen
Copy link
Copy Markdown
Collaborator

@geelen geelen commented Jul 16, 2025

No description provided.

geelen and others added 10 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 <amp@ampcode.com>
@geelen geelen changed the title Fixing oauth flwo Fixing oauth flow Jul 16, 2025
@geelen geelen changed the title Fixing oauth flow Fixing oauth flow on chat example Jul 16, 2025
@geelen geelen merged commit c3ee0e9 into main Jul 16, 2025
7 checks passed
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jul 16, 2025

Open in StackBlitz

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

commit: d80e9f4

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant