Closed adoublef closed 1 year ago
The requestOptions
object is only considered for requests made by the oauth2 client itself (e.g. token requests, ...)
Since you have to redirect the user agent to the authorization URI instead of directly calling it yourself, the getAuthorizationUri
returns an object including the uri
value. If you want to add additional search parameters (like audience
), you can just modify that value like this:
const { uri } = await client.code.getAuthorizationUri({ /* ... */ });
uri.searchParams.set("audience", Deno.env.get("AUTH0_AUDIENCE"));
return uri; // the authorization URI including the "audience" search parameter
ah thank you for the clarity, I can pass this along to the other maintainer as seems this could be incorporated into their package easily
Seeing that denoland/deno_kv_oauth/issues/140 was closed, I'll close this issue here as well :slightly_smiling_face:
I am looking to use this alongside auth0 and I wanted to know how I would go about including the audience when crafting the url? I can see that there are additional options here
However this doesn't seem to be used within the
code.getAuthorizationUri
method and wondering what is the recommended way of setting this up. The audience is required to get a valid JWT back from their services (without the audience the payload is missing)