Auth0 Home Blog Docs

Event based Conditionals and email templates



Hello, my app has seperate password reset and changed password confirmation emails.

These are both directed through the auth0 password change template.
I would like to be able to set a flag I can access within the template so I know whether it should be handled as a password reset or a password change.

Using user_metadata and app_metadata doesn’t seem appropriate. For example, with mailgun I have the ability to tag and send extra metadata on the email. This isn’t a direct comparison as I cannot script on mailgun itself but I can still pass that data through it using my app.

Do I have this kind of event-based flexibility with auth0 emails and how would I start?


Auth0 does not support a password changed confirmation email out of the box. If you are using MailGun as your provider, and have the ability to trigger emails directly through MailGun, you have the option to use the Authentication API Webhooks extension, configured for the Success Change Password log type. This could call an endpoint in your application (or on, which would trigger the email via MailGun.


This doesn’t like what I need to accomplish.
I would just send an email via mailgun directly after the password change happens through my api call.

Auth0 does support it through the ‘verify_password’ option in!/Users/patch_users_by_id.

It uses the password reset template so the content of that email is all wrong for a password change event.

The user should verify they have changed their password before it has actually changed.