Skip to content

Use a string for the default ID token aud #1054

Open

Description

@azmeuk

By default, the ID token aud is a list with the client ID:

claims.setdefault("aud", [request.client.get_client_id()])

This default applies when get_client_claims does not return aud. The examples in the Flask and Django documentation only return iss, so servers that follow them get a list. OpenID Connect Core §2 allows a single string when there is one audience.

With the list, RP-initiated logout cannot find the client from an id_token_hint sent without client_id:

aud = id_token_claims.get("aud")
if isinstance(aud, str):
return self.server.query_client(aud)
return None

Without a client, the end session endpoint ignores post_logout_redirect_uri and does not redirect. RP-initiated logout makes client_id optional, so this request is valid.

IPSIE SL1 also requires relying parties to check that aud is a single string.

Activity

  1. added
    role:authorization_server
    on Nov 13, 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

    role:authorization_server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions