title: Auth0 authorizor rejects JWT token from service - "jwt issuer invalid. expected: https://myservice.auth0.com"
body: <p>I'm walking through the tutorials for setting up auth0 as an API gateway authorizer for AWS listed here: <a href="https://auth0.com/docs/integrations/aws-api-gateway/custom-authorizers" rel="noreferrer">https://auth0.com/docs/integrations/aws-api-gateway/custom-authorizers</a></p>
  
  <p>I am using the recommended authorizer from here: <a href="https://github.com/auth0-samples/jwt-rsa-aws-custom-authorizer" rel="noreferrer">https://github.com/auth0-samples/jwt-rsa-aws-custom-authorizer</a>  </p>
  
  <p>The only modification has been to the config files. </p>
  
  <p>However, when testing the authorizer function, I get the following error:</p>
  
  <pre><code>{"name":"JsonWebTokenError","message":"jwt issuer invalid. expected: https://MYSERVICE.auth0.com"}
  </code></pre>
  
  <p>Where MYSERVICE is the auth0 api I have set up. This is confusing, because I've gotten the jwt token through this method:</p>
  
  <pre><code>curl --request POST \
  --url https://MYSERVICE.auth0.com/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"MY_ID","client_secret":"MY_SECRET","audience":"TestApi","grant_type":"client_credentials"}'
  </code></pre>
  
  <p>The resulting token can be loaded into the debugger tool at <a href="https://jwt.io/" rel="noreferrer">https://jwt.io/</a>, and it reports the iss field as <a href="https://MYSERVICE.auth0.com" rel="noreferrer">https://MYSERVICE.auth0.com</a> </p>
  
  <p><a href="https://i.stack.imgur.com/y7i55.png" rel="noreferrer"><img src="https://i.stack.imgur.com/y7i55.png" alt="enter image description here"></a></p>
  
  <p>Is there a misconfiguration that might cause this issue?</p>