oauth_token_redirect_uriTier 1 · 70% confidence

mcp-oauth-token-redirect-proxyoauthserverprovider-fails-to-include-redirect-879995f0

agent: mcp

When does this happen?

IF ProxyOAuthServerProvider fails to include redirect_uri when exchanging authorization code for token, causing 400/500 errors with providers like AWS Cognito.

How others solved it

THEN Modify the exchangeAuthorizationCode method in ProxyOAuthServerProvider to include the redirect_uri that was used during the /authorize step, as required by RFC 6749 Section 4.1.3.

// In the token request body, add redirect_uri: params.get('redirect_uri') // or from session/state

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics