# How to allow list of URL's in Auth0 after mentioning particular path

**URL:** <https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806>\
**Category:** Get Help\
**Tags:** callback-urls, login, auth0\
**Created:** [March 21, 2021, 3:38pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806 "2021-03-21T15:38:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [March 21, 2021, 3:38pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/1 "2021-03-21T15:38:20Z")

</div>

Hello Team,

I have used the callback URL before to allow the user to enter a particular url after the login operation is done and before I have given a static url in callback for example “[https://dev.auth0.com/report\_fleet](https://dev.auth0.com/report_fleet)” and it works fine completely. But now I have a new requirement where my URL varies for each operation after a particular path for example “[https://dev.auth0.com/report\_snapshot/11](https://dev.auth0.com/report_snapshot/11) or [https://dev.auth0.com/report\_snapshot/100](https://dev.auth0.com/report_snapshot/100) or [https://dev.auth0.com/report\_snapshot/200](https://dev.auth0.com/report_snapshot/200)” is there a way to allow all the url’s after the following path “[https://dev.auth0.com/report\_snapshot/](https://dev.auth0.com/report_snapshot/)”. I am new to Auth0 can you please help me to figure out this issue and provide me a detailed step of how to achieve this.

---

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [March 22, 2021, 12:26pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/2 "2021-03-22T12:26:47Z")

</div>

Hi Team,

Sorry for pushing on this request I know its too early to follow up but I have my production release on coming Friday so it will be great if I get some response as soon as possible from you guys 🙂

---

<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:01pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/3 "2021-03-23T13:01:22Z")

</div>

Hi @vignesh.ramesh,

As mentioned in [this topic](https://community.auth0.com/t/allowed-callback-urls-ending-with-a-wildcard/7626/2), unfortunately you cannot use a wildcard to match several callback URLs. Instead the suggested way to handle multiple routes is to use a single callback route (e.g. /callback) and redirect to the desired route from within your application:

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.

---

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [March 23, 2021, 1:18pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/5 "2021-03-23T13:18:27Z")

</div>

Hello @stephanie.chamblee ,

Thanks for providing the solution, I will implement this from my end and let you know if I face any issue

---

<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, 5:45pm UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/6 "2021-03-23T17:45:05Z")

</div>

Hi @vignesh.ramesh,

I noticed [this issue](https://github.com/auth0/auth0-spa-js/issues/574#issuecomment-688838781) and realized that the Auth0 SPA SDK has its own way of storing state that can be retrieved from when you call `handleRedirectCallback`:

```auto
// set state when you request redirect
client.loginWithRedirect({
  appState: { 'randomString': '/report_snapshot/200' }
});

// Retrieve the state
const { appState } = handleRedirectCallback();
const redirectPath = appState[redirectKey];

```

I updated the example above.

---

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [March 24, 2021, 9:00am UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/7 "2021-03-24T09:00:29Z")

</div>

Hello @stephanie.chamblee ,

Thanks for providing me the solution , it works fine 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 8, 2021, 9:01am UTC](https://community.auth0.com/t/how-to-allow-list-of-urls-in-auth0-after-mentioning-particular-path/59806/8 "2021-04-08T09:01:06Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
