# Callback URL mismatch when changing the allowed callback URL of the application

**URL:** <https://community.auth0.com/t/callback-url-mismatch-when-changing-the-allowed-callback-url-of-the-application/59914>\
**Category:** Get Help\
**Tags:** dashboard, angular, login, auth0\
**Created:** [March 23, 2021, 9:11am UTC](https://community.auth0.com/t/callback-url-mismatch-when-changing-the-allowed-callback-url-of-the-application/59914 "2021-03-23T09:11:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 23, 2021, 1:13pm UTC](https://community.auth0.com/t/callback-url-mismatch-when-changing-the-allowed-callback-url-of-the-application/59914/3 "2021-03-23T13:13:24Z")

</div>

Hi @sinko,

Welcome to the Community!

For **Allowed Callback URLs** , you cannot use something like a wildcard (e.g. [http://localhost:4200/](http://localhost:4200/)\*), but instead the URL must be an exact match, including the relative path.

The suggested implementation is to pass a `state` param when requesting authentication and then refer to that in the `/callback` page to perform the redirect:

1. Store the following in localStorage: `randomStateValue` : `the URL pathname`.

2. Pass `randomStateValue` as the `state` parameter in the authentication request.

3. Check the state value in the callback, and retrieve the value for `randomStateValue` from localStorage.

4. Perform the redirect from within your application.

**Documentation:** [Prevent Attacks and Redirect Users with OAuth 2.0 State Parameters](https://auth0.com/docs/protocols/state-parameters#redirect-users)

**Related topics:**

- [How to allow list of URL's in Auth0 after mentioning particular path - #3 by stephanie.chamblee](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/3)
- [Allowed Callback URLs ending with a wildcard - #2 by prashantT](https://community.auth0.com/t/allowed-callback-urls-ending-with-a-wildcard/7626/2)

---

_[View the full topic](https://community.auth0.com/t/callback-url-mismatch-when-changing-the-allowed-callback-url-of-the-application/59914)._
