Currently whenever a user is created in Auth0 the verification e-mail template is automatically sent if its status is set to Active.
For some applications however, I need to send the e-mail from the Auth0 Management API instead in a Post-User-Registration Action. This is so that I can, ultimately, alter the Redirect URL based on the user’s metadata (not possible in the E-mail Template directly since the user’s metadata isn’t available there).
So by sending the verification e-mail from the API, one can theoretically accomplish user-based redirect URLs in roundabout way by setting the clientID as an arbitrary value in the API call, and the template can look for that clientID value in the Redirect URL field in the template UI in the screenshot below.
So to summarize, I’m looking for a way to turn off automatic verification emails being sent for certain applications and send it from the API instead so I can alter the redirect URL based on the user’s metadata.
Unfortunately, it is not possible to enable the Verification Template for a subset of your total applications. When the Verification Template is enabled, it applies to all of your applications.
Now one workaround I can offer is to create the users with the verify_email set to False. This way, the Verification Email is not sent to them on creation. Please take note that this will require you to create the users on their behalf. If the users sign up by themselves, you will not be able to modify this effect.
Thanks for the reply. I’ve settled on an approach of storing the relevant metadata as a custom claim on the token, and reading that value from the token at the Redirect To destination.
I looked into setting email_verify to false on sign-up, but the Auth0 API function we’re using for sign up doesn’t support setting that field.