Skip to content

[BUG] OAuth Debugger ignoring custom Okta authorization server #1002

@fporcaro

Description

@fporcaro

Issue

An Okta instance provides a default OAuth authorization server .okta.com/oauth2/default, but it is common to create custom authorization servers so you can limit the scopes that can be used when requesting tokens and those have a custom issuer .okta.com/oauth2/<auth_server_id>.

When returning the oauth-protected-resource payload, we are returning the url of a custom authorization server. When MCP Jam hits the .well-known/oauth-authorization-server to get the details, it always uses the default auth server for the base domain, which is the default authorization server for the tenant, which doesn't have the same/correct audience, scopes or keys as the custom auth server.

Expected Behavior

If a custom issuer is returned, that should be the base url for the .well-known/oauth-authorization-server call. For example, if the oauth-protected-resource returns a payload like this:

{
  "Resource":"https://awesome-mcp-server.example.com/mcp",
  "Authorization Servers":[
    "https://my-okta-tenant.okta.com/oauth2/xyz123"
  ]
}

Then the oauth-authorization-server well-known endpoint details should be fetched using the following url:
https://my-okta-tenant.okta.com/oauth2/xyz123/.well-known/oauth-authorization-server

Platform

  • npx on Windows

I do have an MCP server displaying this issue if you reach out for details, I can provide them.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions