Skip to content

fix(mcp): honor callback configuration in standalone OAuth login - #3977

Open
aheritier wants to merge 1 commit into
fix/3879-debug-oauth-login-repairfrom
fix/3879-debug-oauth-callback-parity
Open

fix(mcp): honor callback configuration in standalone OAuth login#3977
aheritier wants to merge 1 commit into
fix/3879-debug-oauth-login-repairfrom
fix/3879-debug-oauth-callback-parity

Conversation

@aheritier

@aheritier aheritier commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Standalone debug OAuth login now aligns with runtime callbackPort/callbackRedirectURL behavior using NewCallbackServerOnPort and ResolveRedirectURI.

The resolved redirect URI is consistent across DCR, authorize, callback, and token exchange. Default behavior is unchanged.

Tests cover configured port, redirect URL placeholder, explicit-client/no-DCR, and bind failure.

Stacked on #3959, #3955, and #3881.

Validation:

Manual validation

  • This PR is stacked on fix(mcp): repair standalone OAuth login discovery #3959.
  • Use a non-default local callback port and/or a configured callback redirect template in a test remote, then run debug OAuth login.
  • Verify consent returns successfully and a read-only operation succeeds.
  • Verify the default configuration still works.
  • If testing a real service, keep callback and authorization data local and do not publish it; OAuth output and authorize URLs are sensitive.

Align `debug oauth login` with the runtime's managed OAuth flow by using
NewCallbackServerOnPort/ResolveRedirectURI instead of the fixed
NewCallbackServer/GetRedirectURI pair, so RemoteOAuthConfig.CallbackPort
and CallbackRedirectURL are honored identically in both paths.
@aheritier aheritier added area/mcp MCP protocol, MCP tool servers, integration kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Aug 13, 2026
@aheritier
aheritier marked this pull request as ready for review August 13, 2026 17:19
@aheritier
aheritier requested a review from a team as a code owner August 13, 2026 17:19
melmennaoui
melmennaoui previously approved these changes Aug 14, 2026
@aheritier
aheritier force-pushed the fix/3879-debug-oauth-callback-parity branch from c0d56cf to 58e48ae Compare August 14, 2026 09:23
@aheritier
aheritier force-pushed the fix/3879-debug-oauth-callback-parity branch from 58e48ae to 6b44997 Compare August 14, 2026 10:12
@aheritier
aheritier force-pushed the fix/3879-debug-oauth-callback-parity branch from 6b44997 to c0d56cf Compare August 14, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mcp MCP protocol, MCP tool servers, integration kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants