Jon Sanders
Jon Sanders

Reputation: 63

How to configure Auth0 callback for custom domain in netlify?

I just launched a React app on Netlify. I have an issue with my Auth0 integration in the app. In Auth0, I've added my custom domain name to the list of allowed callback URLs, but I get an error when I try to sign in, saying:

Callback URL mismatch.
The URL "https://<blah long url here>.netlify.com/callback" is not in the list of allowed callback URLs.

I've tried adding that URL, but then on sign in, the app actually redirects to that long Netlify URL instead of my custom domain. Anyone know a way around this?

Upvotes: 1

Views: 1277

Answers (1)

ShrekOverflow
ShrekOverflow

Reputation: 6916

Disclosure: I work for Auth0.

From the error it seems that the application is sending https://APP_ID.netlify.com/callback as a callbackUrl instead of your custom domain url. You'll need to set your custom domain as your callbackUrl in Auth0.js' (or our other SDKs) redirectUri instead of the https://APP_ID.netlify.com/callback when using custom domains!

Upvotes: 2

Related Questions