Skip to content

Embedded auth server: DCR clients missing audience whitelist breaks refresh token with resource parameter #3777

Closed

Description

@jhrozek

Problem

Dynamically registered clients (via RFC 7591 DCR) have no Audience field set on fosite.DefaultClient. When a client sends grant_type=refresh_token with resource= (RFC 8707), Fosite validates the original session's granted audience against the client's registered audience whitelist. With an empty whitelist, all refresh token requests fail:

"Requested audience '...' has not been whitelisted by the OAuth 2.0 Client."

The initial authorization_code exchange works because Fosite's auth code handler does not perform the audience whitelist check. The refresh_token handler does (flow_refresh.go:98).

Expected behavior

DCR-registered clients should inherit the server's AllowedAudiences so that refresh token requests with resource= succeed.

Impact

Refresh token requests fail for all DCR clients when the resource parameter is used (which MCP clients send per RFC 8707).

Activity

  1. added
    bug
    go
    on Feb 11, 2026
  2. self-assigned this
    on Feb 11, 2026
  3. added 2 commits that reference this issue on Feb 11, 2026
    c3ad3c4
    d343edf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

authenticationbuggo

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions