Skip to content

Missing OIDC client documentation on custom claims #621

Description

@schicho

Problem

The documentation with examples on the website is excellent, yet I cannot find any details how to retrieve custom claims.
I think this may just have been forgotten? Or one is supposed to know intuitively?

I followed the example for the Flask OIDC client and can get all the standard claims.

oauth.register(
    "organization",
    server_metadata_url="[...]",
    client_kwargs={"scope": "openid email profile"},
)

@bp.route("/auth")
def auth():
    token = oauth.organization.authorize_access_token()
    session["user"] = token["userinfo"]

However there is no documentation for custom claims, as shown below.

Proposed solution

Given a well known config with

"claims_supported": [
        "address",
        "birthdate",
        "client_id",
        "cn",
        "company",
        "department",
...
]

add example code to the documentation at on how to retrieve the custom claim for department for instance.

I have looked around the issues here, looked on Stack Overflow, nada.
I can make a contribution and extend the examples, when someone can help me with this.

Activity

  1. schicho commented on Jan 17, 2024

    @schicho
    Author

    I am aware of issues referencing custom claims, yet no examples with OIDC get me there.

    The closest is #549, but that does not help me either

  2. changed the title [-]Documentation: Missing OIDC client documentation on custom claims[/-] [+]Missing OIDC client documentation on custom claims[/+] on Feb 20, 2025
  3. added theissue type on Apr 30, 2025
  4. added a commit that references this issue on Oct 19, 2026
    9986e12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions