Skip to content

OIDCProxy: The proxy sends scope parameter in /token request while exchanging Authorization code for a token. #5058

Closed

Description

@kiranthakkar

What happened?

Hello

I am integrating OIDCProxy with my authorization server using the standard OIDC Authorizastion code flow with the openid scope.

The authorization step completes successfully:

  1. MCP client is redirected to the authorization server's /authorize endpoint.
  2. The user authenticates successfully.
  3. The authorization server redirects to the registered redirect URI with an authorization code.

However, when OIDCProxy exchanges the authorization code at the /token endpoint, it includes a scope parameter in the token request.
For an OIDC Authorization code exchange, scope is requested at the authorization endpoint and it not a standard parameter of the token request. The token request should contain grant_type, code, redirect URI, code_verifier (in case of OKCE), and client authentication where required.

Could you please confirm whether OIDCProxy can omit scope from the Authorization Code token exchange request? If not, provide a way to omit scope.

Thanks

Example Code

Version Information

FastMCP version is 4.0.3. However, I can reproduce the issue with 3.x version as well.

Activity

  1. added
    bug
    on Sep 10, 2026
  2. added
    auth
    on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions