Auth0 Home Blog Docs

"Request has been terminated" when trying to obtain JWTKS


#1

Hi, I seem to be encountering the same issue as this poster:

When auth0-js tries to obtain the JWTKS, then the superagent library which it uses always returns the following error:
Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

Interestingly, authentication works perfectly in my development environment but not in production, even though I’m using exactly the same Docker image in both cases. In the Network tab of the Chrome devtools I can see that an attempt is made to retrieve the JWTKS but the request doesn’t succeed. Of course I initially assumed I had entered the wrong callback URI, but I checked that many times.


#2

This seems to be a CORS issue, the origin I use in my dev environment works whereas the origin we use in production is denied. Since I already verified the settings for my app many times, I’d be grateful if someone could look into it.