Problem: JWT is created with the wrong audience.
Expected Behavior: When creating an Auth0Client, the client will use the passed in option for audience.
Actual Behavior: The Auth0Client disregards passed in audience and generates a JWT with an audience that is the same as the access_token.
Description:
I’m using:
createAuth0Client({
domain: environment.auth0.domain,
client_id: environment.auth0.clientId,
redirect_uri: environment.auth0.redirectUri,
responseType: 'token id_token',
scope: 'openid profile offline_access',
audience: environment.auth0.audience
})
Authentication works, silent auth works. However, the “audience” prop in the id_token (the JWT) is always set to the same value as the access token. It’s like it completely disregards my Auth0ClientOptions.
I’ve also tried:
client.getIdTokenClaims({
scope: 'openid profile offline_access',
audience: environment.auth0.audience
}))
Again, it doesn’t use the audience I passed in. How do I generate a JWT with the passed in audience? I need to control the audience used when generating the verified JWT.