Search code examples
react-router-v4auth0netlify

Error when redirecting from auth0 to netlify


I have an application running on a subdomain via netlify.

    https://whatever.mydomain.fakedomain

I'm using react router v4, I'm using the createBrowserHistory

My callback url is set properly on auth0, but went it tries to redirect, it cannot find the route even if it is coming to https://whatever.mydomain.com/callback?...

If I change my application to work a main domain https://mydomain.fakedomain it works properly, I'm not sure what is the proper way to solve this.

Any ideas?


Solution

  • I solved using redirect via netlify, so basically, the solution to create a netlify.toml file with something like:

    [[redirects]]
      from = "/callback"
      to = "https://whatever.mydomain.fakedomain"
      status = 200