# Specify callbacks for URL using a segment

**URL:** <https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324>\
**Category:** Get Help\
**Tags:** path, callbacks\
**Created:** [April 23, 2017, 7:00am UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324 "2017-04-23T07:00:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![devguy.ca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devguy.ca/32/7119_2.png) [@devguy.ca](https://community.auth0.com/u/devguy.ca)\
**Post date:** [April 23, 2017, 7:00am UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/1 "2017-04-23T07:00:45Z")

</div>

I have a login button on my navbar in my Angular app.

How can I specify from the Auth dashboard an “Allowed Callback URLs” for url with segments?

If I have a path with a segment (id) like this:

[http://localhost:3000/customer/:id](http://localhost:3000/customer/:id)

I tired [http://localhost:3000/customer/](http://localhost:3000/customer/)\* but it doesn’t work.

If there a simple way for me to simply every path under, “[http://localhost:3000/](http://localhost:3000/)” ?

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 24, 2017, 11:40am UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/2 "2017-04-24T11:40:57Z")

</div>

The recommended approach is to setup a route to handle callbacks in your application (e.g. `http://localhost:3000/login/callback`), which can then redirect to the desired page.

1. You can store the desired destination ([http://localhose:3000/customer/:id](http://localhose:3000/customer/:id)) in `localStorage`.
2. After authenticating, Auth0 will redirect to your Allowed Callback URL ([http://localhost:3000/login/callback](http://localhost:3000/login/callback))
3. Your application will then redirect to the URL stored in localStorage.

---

<div class="post-metadata">

**Author:** ![devguy.ca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devguy.ca/32/7119_2.png) [@devguy.ca](https://community.auth0.com/u/devguy.ca)\
**Post date:** [April 24, 2017, 1:17pm UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/3 "2017-04-24T13:17:47Z")

</div>

Thanks for the explanation! I like your approach, I was initially confused the callback was the url I was making the call to login from, not the return location!

---

<div class="post-metadata">

**Author:** ![devguy.ca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devguy.ca/32/7119_2.png) [@devguy.ca](https://community.auth0.com/u/devguy.ca)\
**Post date:** [April 24, 2017, 1:17pm UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/4 "2017-04-24T13:17:47Z")

</div>

Thanks for the explanation! I like your approach, I was initially confused the callback was the url I was making the call to login from, not the return location!

---

<div class="post-metadata">

**Author:** ![dimitrovs](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dimitrovs](https://community.auth0.com/u/dimitrovs)\
**Post date:** [May 28, 2017, 10:24pm UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/5 "2017-05-28T22:24:59Z")

</div>

Why is it a problem to enable wildcard in the path when you already allow wildcard in the subdomain? This is a very annoying issue.

---

<div class="post-metadata">

**Author:** ![jake.ferrante](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jake.ferrante/32/24830_2.png) [@jake.ferrante](https://community.auth0.com/u/jake.ferrante)\
**Post date:** [June 5, 2017, 2:10pm UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/6 "2017-06-05T14:10:51Z")

</div>

While this answer seems to suffice for the OP, the original question was not answered.

---

<div class="post-metadata">

**Author:** ![david.edson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.edson/32/6866_2.png) [@david.edson](https://community.auth0.com/u/david.edson)\
**Post date:** [June 7, 2017, 11:18am UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/7 "2017-06-07T11:18:40Z")

</div>

I agree, I would like to have wild card matching for descendent paths in a “trusted” domain.

---

<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:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/specify-callbacks-for-url-using-a-segment/6324/8 "2018-03-02T05:53:26Z")

</div>


