googleapis / googleapis/google-oauth-java-client

Support audience claim in token URL request

Open
#497 2 comments 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
Java
Stars
661
Forks
284
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Auth0 Identity provider returns an opaque token unless the query parameter "audience" is set when requesting an access token. They use this parameter to determine which resource server to authorize the user to. See this support request: [https://community.auth0.com/t/why-is-it-necessary-to-pass-the-audience-parameter-to-receive-a-jwt/11412](here).

**Describe the solution you'd like**
I would like a simple way to add extra parameters to the auth flow.

**Describe alternatives you've considered**
Extending the AuthorizationCodeFlow class to include the audience parameter, and using the AuthorizationCodeRequestUrl.set() method to add the query parameter. This resolved the issue, but required extending the builder as well, and will be sensitive to updates to the client.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.