Getting "Callback URL mismatch" with Auth0
<p>I have an Auth0 client that's configured with the following callback URL:</p>

<p><a href="http://localhost:4200" rel="noreferrer">http://localhost:4200</a></p>

<p>I can log in just fine.</p>

<p>The problem is when I navigate to a certain URL in my app: <code>http://localhost:4200/places</code>. Here's what happens:</p>

<ol>
<li>I navigate to <code>http://localhost:4200/places</code></li>
<li>Angular redirects me (correctly) to <code>http://localhost:4200</code></li>
<li>I try to log in</li>
<li>I get an error from Auth0 saying "The url "<a href="http://localhost:4200/places" rel="noreferrer">http://localhost:4200/places</a>" is not in the list of allowed callback URLs".</li>
</ol>

<p>Auth0 is right, <code>http://localhost:4200/places</code> is not in my list of allowed callback URLs&mdash;and I don't want it to be. I don't want to list any and every URL that my user might get kicked back to the login screen from.</p>

<p>So for some reason something is happening that's telling Auth0 that the referring URL is <code>http://localhost:4200/places</code> rather than <code>http://localhost:4200</code>, even though <code>http://localhost:4200</code> is in fact the URL in the address bar when I attempt to log in.</p>

<p>I realize I could specify <code>http://localhost:4200</code> as the <code>redirectUrl</code> and "fix" the problem, but then I'd have to make <code>redirectUrl</code> be different on dev, staging, and production. It doesn't seem like that's probably the way people usually get around this issue.</p>

<p>How can I get Auth0 not to try to redirect me to <code>/places</code>?</p>