"Request has been terminated" when trying to obtain JWTKS

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.

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.

Replying to this post for posterity since this problem was nearly exactly what I was wrestling with for a little while today. In my case the Chrome plugin “Privacy Badger” was killing the request. Of course I had figured this out several hours ago for the localhost then forgot about it by the time I deployed to my serverside (Heroku). I hope this helps someone else. :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.