Can I use wildcards in redirect_uri after login?

Hey everyone,

I have the following front-end code that handles my login with the universal login.

export const auth0Client = createAuth0Client({
	domain: config.auth.domain,
	clientId: config.auth.clientId,
	cacheLocation: 'localstorage',
	authorizationParams: {
		redirect_uri: window.location.origin,
		audience: config.auth.audience
	}
})

What I’d like to do is to add a deeper URI to redirect_uri: window.location.origin so I can bounce my user to the deep link they requested. However this seems to require specifying each and every possible valid URI in the Auth0 back-end.

Is there any simple way round this?

Many thanks!

Hey @kkrp1 , thanks for posting.

If I’m not mistaken, under the Allowed Calback URLs in your Auth0 tenant, you can add wildcard for the subdomain, like https://*.example.com, but not this way https://example.com/*

This docs can be also useful to review - How do I set up a dynamic Allowed Callback URL?

Please let me know if you have any follow up questions!

1 Like

Thank you. It was really the latter (wildcards in URI) I was after, but if that’s not possible, then the state solution outlined in the linked docs would seem to be the way to go.

Appreciate the help.

1 Like

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