Auth0 Invalid Compact Jws

Auth0 Invalid Compact Jws

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

1 Answer

TL;DR

  1. Verify which auth0 script version you are using
  2. Check that all auth0 methods keys match your version by verifying an appropriate auth0 sample code, e.g. vanilla JS
Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.