Hey all. Quick Q: We have added custom claims to ...
# talk-hydra
s
Hey all. Quick Q: We have added custom claims to our ID Token, yet when remembering the consent result all further token exchanges or userinfo calls will not include those claims in the ID token anymore. Is this by design?
m
I believe this is what you are looking for: https://www.ory.sh/docs/hydra/advanced#adding-custom-claims-top-level-to-the-access-token So I think you need to add some configuration for your claim in
oauth2.allowed_top_level_claims
There is also an old ongoing discussion (if you like to read a lot about the considerations around custom claims): https://github.com/ory/hydra/issues/1748
s
Yeah that one is a prerequisite, but had it in. Finally found the issue. When skipping, one needs to apply some custom login here and also rename some fields, symmetrically to here. Works like a charm then.
m
Good to hear 🙌