-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Granted audience not set in OIDC token #1264
Comments
Perhaps an issue in Fosite. The exact line in Fosite where the ID token is generated and the field gets set: The Audience is retrieved from the "Claim". I've tried including it in "aud" field in the claim, but it seems (understandably so) to have gotten filtered out somewhere but not replace with the granted audiences. |
You're setting the access token audience but expect the id token audience to be different - here lies the problem. The ID Token audience is usually only the client id. The access token audience might be different because you may want the access token to be applicable only for certain resource servers. |
I was actually setting the access token audience array (using the granted option through consent accept) and expecting the id token audience array to be the same. |
Those are conceptually different:
Therefore it doesn't make sense for the two to be equal. |
Hmm, what options do I have to set id token audience in hydra? I can get around it, but I'd like to adhere to the terminology of the spec. I have a single page application (clientid=
My relying party is not the requester (
The authorized party (field= |
The ID token is used to authenticate at the client side, not the first party resource server ( |
I'll close the issue, thanks for the information. The |
Describe the bug
The granted audiences are not included in the OIDC token. The
aud
field always contains merely the clientID.This is not conforming to the spec AFAIK.
https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.2
To Reproduce
Steps to reproduce the behavior:
Request custom audience and grant it with the consent accept.
Taking a look at the sessions for this particular user, the granted audiences look alright!
We grab the OpenID Connect token and decode the second part to:
The
aud
element is still set to justwebsite
, whilst we additionally granted the scopehttps://CUSTOMAUDIENCEURL/
Expected behavior
We expect the audiences to be included in the OpenID Connect token.
Version:
The text was updated successfully, but these errors were encountered: