Node Requests Connection Timeout

Hi, weird issue here. It seems like requests to auth0 made from node backend code always time out. Requests from my browser seem fine, so it doesn’t seem like my IP address as a whole is being blocked. If I connect to a VPN it works again. I turned off all the attack protection settings and that didn’t seem to help. Not sure if it’s my ISP blocking very specific traffic or something on the auth0 side. I changed my DNS to google’s DNS on both my PC and router and that didn’t help either.

Basically,

  • https://[my-tenant].us.auth0.com/.well-known/openid-configuration from by browser works (as well as login from my client app)
  • The below code ran with node does not work, unless I’m connected to a VPN. I just get Connect Timeout Error
fetch('https://[my-tenant].us.auth0.com/.well-known/openid-configuration')
    .then(r => console.log(r))
    .catch(e => console.error(e))

Any help at all would be much appreciated, thanks!

1 Like

Hi @michael.dormann,

Are you able to make requests to other URLs with this script? You could try a different Auth0 endpoint or another service (like https://google.com).

Also, can you try access the Auth0 endpoint with a cUrl request?

Hi @dan.woda,

Yes, I forgot to mention I tried both of those. Requests to other URLs from the script, like google, worked. Also requests from my terminal with curl also worked. It was just requests to auth0 from node that didn’t work.

Since I made this post the issue fixed itself. I didn’t change anything and it’s been working. I suspect it the issue was with my ISP. We’ll see if it happens again.

Thanks for trying though!

1 Like

Great, glad it was resolved. I am going to mark it as such, but please feel free to make a new thread if this issue happens again.

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