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

Support custom audience in access token #158

Open
sergiodxa opened this issue Jan 17, 2025 · 0 comments
Open

Support custom audience in access token #158

sergiodxa opened this issue Jan 17, 2025 · 0 comments

Comments

@sergiodxa
Copy link

sergiodxa commented Jan 17, 2025

Right now, the access token JWT uses the client_id as the aud (audience) value. The audience value can be the client (typically only for id tokens), but it can also be used to indicate the resource server (the API) that will receive and validate the token.

Providers like Auth0 let you pass an audience value as a search param when going to the authorization endpoint, so the JWT can be generated for that intended audience.

It would be nice if OpenAuth added support for this so it can be used not only with clients validating the token but also resource servers validating the token received from the client.

Another thing is that the audience can be a string or an array of strings in case the client requested a token to be used with multiple audiences (resources server).

I think either the issuer accepts any audience value, or there could be an optional function that receives the client_id and the required audience and we can implement validation there to know if the client_id can access that audience.

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