Auth0 Home Blog Docs

Which fields are available in the redirect-to url of the reset email



Our situation:
* Each of our customers access our product through a custom domain: <customer>.<our-domain>
* We have a single tenant that handles authentication for all users of all customers.
* Normal login flow: user goes to https://<customer>.<our-domain>/login which redirects them to https://login.<our-domain> (form hosted by Auth0), which redirects back to https://<customer>.<our-domain>

Our goal:
* After a user resets their passwords, we want them to be redirected to https://<customer>.<our-domain>

This however is problematic. In the user.app_metadata we store which customer a user belongs too, but I am not sure how to leverage this. The email template for the reset-email allows us to set a ‘redirect url’, but according to the documentation we can only set a static url there. Now I noticed that in the redirect-url field we can also use {{}} (but this doesn’t seem to be documented), so one solutions might be to create one application per customer and make the redirect url https://{{}} But that seems like a lot of configuration work to achieve a redirect.

1) Can you make it possible to use {{user.app_metadata}} in the redirect url for emails?
2) Can we reliably use {{}} in the redirect url, or might this break at some point?
3) Do you have any other suggestions to achieve our goal?

I saw that there were similar questions to these in the past, but none with any conclusive answers.