Auth0 Home Blog Docs

Specify callbacks for URL using a segment

path
callbacks

#1

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

I tired http://localhost:3000/customer/* but it doesn’t work.

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


#2

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) in localStorage.
  2. After authenticating, Auth0 will redirect to your Allowed Callback URL (http://localhost:3000/login/callback)
  3. Your application will then redirect to the URL stored in localStorage.

#3

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!


#4

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!


#5

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.


#6

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


#7

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


#8