"Unknown host" when trying to login

Hello,

i’m trying to setup my react SPA with Auth0 and set it up exactly as the setup guide stated. Domain and Client ID are both correct. However, when trying to login with the “loginWithRedirect()” function I’m getting an error after the redirect: “Unknown Host”

Any ideas how to fix this? Help is greatly appreciated.

2 Likes

Hi @dschulz,

Welcome to the Auth0 Community!

The Unknown Host error happens when the domain you used for the login request does not match the domain for your tenant.

See screenshot:
image

In this case, please make sure that your domain matches the following format: https://YOUR_DOMAIN.REGION.auth0.com

You can get your Domain by going to your Application settings and copying the domain specified there.

Thanks,
Rueben

1 Like

That was actually the problem, can’t believe i missed that. thanks for the help!

2 Likes

Hi @dschulz,

Of course, you’re welcome!

Please feel free to reach out again if you have any other questions.

Cheers,
Rueben

1 Like

Thanks for sharing. It works.

2 Likes