Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Missing OIDC client documentation on custom claims #621

Open
schicho opened this issue Jan 17, 2024 · 1 comment
Open

Documentation: Missing OIDC client documentation on custom claims #621

schicho opened this issue Jan 17, 2024 · 1 comment

Comments

@schicho
Copy link

schicho commented Jan 17, 2024

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.

@schicho
Copy link
Author

schicho commented Jan 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant