Perhaps there may just be issues with the service?
Im using a simple React SPA and express graphql backend.
My Auth provider looks like:
<Auth0Provider
domain="mydomain"
clientId="clientid"
redirectUri={window.location.origin}
audience="test"
>
<App />
</Auth0Provider>
I am then using getAccessTokenSilently, i have tried with and without adding audience here:
const token = await getAccessTokenSilently({
audience: 'test',
});
This returns me a JWE / opaque token that is unusable.
The audience on my API is the same but regardless i cant get past opaque access token from the front end call so it seems the problem is here. This is with a default simple setup for Single Page Application, and an API where the identifier is set to 'test'
Thanks in advance for your help
1 Answer
TL;DR
- Verify which auth0 script version you are using
- Check that all auth0 methods keys match your version by verifying an appropriate auth0 sample code, e.g. vanilla JS