Is it possible to redirect to specific url by app after email verification?

I currently have multiple sites set up to use Auth0. I need to know what my options are to redirect to a specific url based on the original app that the user registered with. I know there is a Redirect To field on the verify email template but there doesn’t appear to a way to dynamically set the url. I tried setting information in user_metadata but that doesn’t appear to be accessible in this field.

Any suggestions would be greatly appreciated.

Thanks!

Would you mind telling me if in your user’s app_metadata you have any field that identify the site this user belongs to?
Also, the URL you want to redirect to, could be a fix URL? I mean, an URL created by you to verify the email?

I think I figured out a good solution for my problem late last night. I decided to forego the Auth0 Email Template and workflow and built my own using the Auth0 Api. So far it’s working well and I believe my problem is resolved.

1 Like

I didn’t have anything in app_metadata but did in user_metadata. I just posted an answer that hopefully will give others a direction to go if they have the same problem.

Just as a helpful info: User_metadata should store only user attributes (such as user preferences), since an authenticated user can modify this. app_metadata is the one to store information (such as a user’s support plan, security roles, or access control groups), that affect user functionality. (Understand How Metadata Works in User Profiles)

Is that info then available to the Redirect To field in the Email template? That was the problem I was having and couldn’t get to work with the Auth0 workflow. And I also couldn’t find any information on the net.

I’m trying to do the same.

Using {{ application.client_metadata.application_url }}in the subject reveals the application url in the e-mail subject, but using the same macro in the Redirect To field results in the error invalid redirect to url when clicking the verification link.
Can this be made possible?

I’m trying to do the same.

Using {{ application.client_metadata.application_url }}in the subject reveals the application url in the e-mail subject, but using the same macro in the Redirect To field results in the error invalid redirect to url when clicking the verification link.
Can this be made possible?