You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support RFC 8707 Resource Indicators in the OAuth 2.1 authorization server: accept the resource parameter at the authorization and token endpoints, validate it, and bind the issued access token's aud claim to that resource URI.
Why
The MCP authorization spec requires resource-bound tokens: MCP clients send resource per RFC 8707, and strict native connectors (Claude Desktop and web, ChatGPT) reject or mis-scope tokens whose audience is not the MCP resource URL. Today the Supabase OAuth server ignores the resource parameter and stamps aud: "authenticated", so a Supabase-backed MCP resource server cannot satisfy the spec's audience-binding requirement with Supabase-issued tokens — the resource server has no way to influence the audience since only the token issuer can set it.
Issued access tokens: aud: "authenticated" regardless of the requested resource.
RFC 9728 protected-resource metadata on the resource-server side points clients at Supabase as the authorization server, but the tokens that come back are not audience-bound to the resource.
Desired behavior
Accept resource at both the authorization and token endpoints (RFC 8707 semantics, including the multiple-resources / downscoping rules).
Validate the requested resource (e.g., against a per-client allowlist of registered resource URIs, or a project-level configuration).
Issue the access token with aud set to the granted resource URI (keeping "authenticated" as an additional audience would preserve backward compatibility with PostgREST/RLS consumers: aud: [resource, "authenticated"]).
Advertise support in the authorization-server metadata.
Impact
This unblocks the growing class of MCP servers that use Supabase Auth as their identity provider from having to stand up their own authorization server in front of Supabase purely to control the aud claim. With resource indicators supported, a Supabase-backed MCP server works with zero-config native connectors out of the box.
Happy to provide more detail on the MCP flow or test against a preview build — we run a production MCP resource server on Supabase Auth today and currently have to plan a wrapper AS solely for this gap.
Reacted by zenture, Davide Rossetto, Cristian Moldovan, Damian Dąbrowski, max2697, Nico Gallinal, Crt Bozic and mitsuse
I’m seeing this too with a hosted Supabase OAuth 2.1 project. My MCP client included resource in the authorization request, but the issued token had aud: "authenticated". A refresh request explicitly including the same resource produced the same audience, so my MCP server rejected both tokens.
Could you prioritize RFC 8707 resource-bound tokens through authorization, exchange, and refresh, or share the expected path to support them? I’d be happy to test a preview. Thanks!
Confirming on a hosted project (October 2026), and adding the security side of this. It goes beyond spec compliance.
/oauth/authorize accepts any absolute URI as resource. resource=https://evil.example/mcp goes straight to the consent page, and only a non-URI is refused ("resource must be an absolute URI").
A token issued with resource=https://evil.example/mcp on both authorize and token carries aud: "authenticated". No claim records the resource.
Why it is a security issue, not only a compliance one. With dynamic registration on, a user can add a malicious MCP server whose protected-resource metadata names our project as its authorization server. Their own client (Claude or ChatGPT, with a legitimate registration and callback) gets a token "for" that server. Every token has the same audience, so that server can replay it against our MCP server and against PostgREST. The resource server cannot refuse it, and neither can the consent page: getAuthorizationDetails does not expose resource either.
A smaller step that would already unblock projects: pass resource to the Custom Access Token hook, and expose it in getAuthorizationDetails. Projects could then set aud, or warn on the consent screen, while full RFC 8707 support lands.
Activity
max2697 commentedon Oct 3, 2026
I’m seeing this too with a hosted Supabase OAuth 2.1 project. My MCP client included resource in the authorization request, but the issued token had aud: "authenticated". A refresh request explicitly including the same resource produced the same audience, so my MCP server rejected both tokens.
Could you prioritize RFC 8707 resource-bound tokens through authorization, exchange, and refresh, or share the expected path to support them? I’d be happy to test a preview. Thanks!
cadeskriacao commentedon Oct 6, 2026
Confirming on a hosted project (October 2026), and adding the security side of this. It goes beyond spec compliance.
/oauth/authorizeaccepts any absolute URI asresource.resource=https://evil.example/mcpgoes straight to the consent page, and only a non-URI is refused ("resource must be an absolute URI").resource=https://evil.example/mcpon both authorize and token carriesaud: "authenticated". No claim records the resource.Why it is a security issue, not only a compliance one. With dynamic registration on, a user can add a malicious MCP server whose protected-resource metadata names our project as its authorization server. Their own client (Claude or ChatGPT, with a legitimate registration and callback) gets a token "for" that server. Every token has the same audience, so that server can replay it against our MCP server and against PostgREST. The resource server cannot refuse it, and neither can the consent page:
getAuthorizationDetailsdoes not exposeresourceeither.A smaller step that would already unblock projects: pass
resourceto the Custom Access Token hook, and expose it ingetAuthorizationDetails. Projects could then setaud, or warn on the consent screen, while full RFC 8707 support lands.feat(mcp): connect your own Claude, read-only (ADR-028) (#116)
Sign people in to a hosted MCP server with Supabase Auth