Skip to content

fix(console): register legacy MCP OAuth callback - #58453

Merged
neriousy merged 3 commits into
devfrom
mcp-oauth-callback
Oct 23, 2026
Merged

neriousy merged 3 commits into
devfrom
mcp-oauth-callback

Conversation

@neriousy

@neriousy neriousy commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add the legacy /mcp/oauth/callback loopback redirect to the published CIMD metadata
  • keep the current /callback redirects unchanged
  • document the legacy redirect alongside the current entries

This allows authorization servers to validate callbacks from affected released clients while preserving RFC 8252 ephemeral loopback ports. Current v2 continues using /callback.

Fixes #50510
Fixes #58403

Tests

  • bun run typecheck:tsc (packages/console/app)
  • bun typecheck && bun run check:generated && bun run build (services/www)
  • bun run check

Added by the opencode bot (AI-generated).

Public API: adds http://127.0.0.1/mcp/oauth/callback to redirect_uris in /oauth/opencode/client.json (backwards compatible)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound: adding http://127.0.0.1/mcp/oauth/callback to the CIMD redirect_uris covers the path released 1.x clients send. Current v2 already uses /callback, so it is unaffected. I checked the route output: the new test fails on the base route and passes with this PR, and typecheck:tsc passes. I could not try a real login against Exa or Typeform.

Public API: the only public surface is the metadata document at /oauth/opencode/client.json. One redirect_uris entry is added and nothing is removed, so it is backwards compatible.

For a few-line change like this, test/client-metadata.test.ts only repeats the constant array, so it can be dropped to keep the change minimal.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addresses my earlier point: the test is gone and the change is down to the redirect URI addition. I have no new concerns. At the new head, the route still publishes http://127.0.0.1/mcp/oauth/callback alongside the existing /callback entries.

Public API: one redirect_uris entry is added to /oauth/opencode/client.json and nothing is removed, so it is backwards compatible.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only updates the docs. The list in mcp-servers.mdx matches the redirect_uris the route publishes, and I have no new concerns.

Public API: same as before. One redirect_uris entry is added to /oauth/opencode/client.json and nothing is removed, so it is backwards compatible.

@neriousy
neriousy merged commit 24b5ed8 into dev Oct 23, 2026
16 checks passed
@neriousy
neriousy deleted the mcp-oauth-callback branch October 23, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant