curso-r / auth0

Authentication in shinyapps using Auth0 service
https://curso-r.github.io/auth0/
Other
154 stars 21 forks source link

Support `audience` parameter in authorization request #55

Closed AB-Kent closed 4 years ago

AB-Kent commented 4 years ago

To authorize an app to make API calls against a remote server, the authorization request should include an audience parameter.
https://auth0.com/docs/flows/guides/auth-code/call-api-auth-code#example-authorization-url

To do this, the authorize parameter must be added to the query_extra parameter of the httr::oauth2.0_authorize_url call in auth0::auth0_ui.

Could an audience parameter be added to _auth0.yml, either directly or in a query_extra list, and passed to the oauth2.0_authorize_url call?

AB-Kent commented 4 years ago

See the above commit for a possible implementation.

jtrecenti commented 4 years ago

HI @AB-Kent, sorry for the late response. Thank you so much for this, and I think that your solution works well. Would you mind to make a PR?