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

Add api_identifier as an accepted configurable #261

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

QWYNG
Copy link
Contributor

@QWYNG QWYNG commented Mar 7, 2021

Changes

I'd like to fetch a api token with audience that my api identifier.
When I use auth0 with custom domain, I need to specify an audience that is different than the domain.
But I can not unable to do this now.

The :audience parameter is synonymous with the OIDC ID Token and is also used to generate the login URL, so it's confusing.
Auth0's Client Credentials Flow asks the audience for an API identifier.

:custome_domein and :sub were suggested at #189 , but I thought there was a more direct way to express it.
so I think the parameter :api_identifier is not confusing, What are your thoughts?

References

This issue has been discussed at #189 as well.

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of Ruby

Checklist

@QWYNG QWYNG requested a review from a team as a code owner March 7, 2021 01:59
@davidpatrick davidpatrick self-requested a review March 29, 2021 15:33
@davidpatrick davidpatrick force-pushed the pass_api_identifier_api_token branch from e95a7d1 to cddd98a Compare April 9, 2021 01:41
@davidpatrick davidpatrick force-pushed the pass_api_identifier_api_token branch from cddd98a to a7ad6bc Compare April 9, 2021 02:01
@davidpatrick davidpatrick added this to the v5next milestone Apr 9, 2021
@davidpatrick davidpatrick changed the title pass api_identifier at Auth0::Api::AuthenticationEndpoints#api_token Add api_identifier as an accepted configurable Apr 9, 2021
@davidpatrick davidpatrick merged commit af19eb0 into auth0:master Apr 9, 2021
@davidpatrick davidpatrick mentioned this pull request Apr 9, 2021
@QWYNG QWYNG deleted the pass_api_identifier_api_token branch April 19, 2021 12:33
@QWYNG
Copy link
Contributor Author

QWYNG commented Apr 19, 2021

@davidpatrick thank you!

@nigelwtf
Copy link

Super late to the party on this one - but thought it better to comment than to raise a new issue.

Using a different audience & domain is probably a really common requirement - pretty much anyone using this library and who has a custom domain, but I only figured out this existed by reading through unit tests (I even tried Googling it afterwards just to make sure 😂).

Would it be worthwhile documenting api_identifier as a way to specify the audience? I'd be happy to raise a PR if someone steers me in the right direction.

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

Successfully merging this pull request may close these issues.

3 participants