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” 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 or https://dev.auth0.com/report_snapshot/100 or 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/”. 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.
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 
Hi @vignesh.ramesh,
As mentioned in this topic, 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:
-
Store the following in localStorage: randomStateValue : the URL pathname.
-
Pass randomStateValue as the state parameter in the authentication request.
-
Check the state value in the callback, and retrieve the value for randomStateValue from localStorage.
-
Perform the redirect from within your application.
Hello @stephanie.chamblee ,
Thanks for providing the solution, I will implement this from my end and let you know if I face any issue
Hi @vignesh.ramesh,
I noticed this issue and realized that the Auth0 SPA SDK has its own way of storing state that can be retrieved from when you call handleRedirectCallback:
// 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.
Hello @stephanie.chamblee ,
Thanks for providing me the solution , it works fine 