InvalidTokenError: Invalid Compact JWS

Hi there, ive followed the docs and have set this up previously but struggling with this:

Im using auth0 on my front end and backend, but there seems to be a problem, im getting this error: InvalidTokenError: Invalid Compact JWS

node_modules/express-oauth2-jwt-bearer/dist/index.js:403:24 {
status: 401,
statusCode: 401,
headers: {
‘WWW-Authenticate’: ‘Bearer realm=“api”, error=“invalid_token”, error_description=“Invalid Compact JWS”’
code: ‘invalid_token’

Here is the api check: const jwtCheck = auth({
audience: ‘h t t p s://’,
issuerBaseURL: ‘’,
tokenSigningAlg: ‘RS256’,

auth provider in index.js <Auth0Provider
clientId={{MY CLIENT ID}}
audience=“h t t p s://”

And the front end getting the token and making the request const authLink = setContext(async (_, { headers }) => {
const token = await getAccessTokenSilently();
return {
headers: {
Authorization: Bearer ${token},

const client = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache(),

The token im sending is identical to the one the API is recieving

Can anyone please help?

To add to this it appears that the access token is a JWE not a JWT token though there is nowhere i can set this and i havent changed any oauth settings so this should i believe default to JWT?