How to Reliably Send an Email After Successful MFA Enrollment in Post-Login Action Using enrollWith?

Hey,

I’m working on a Post-Login Action in my Auth0 tenant where I need to send an email to the user after they successfully enroll in MFA using the enrollWith method. However, I’m facing challenges ensuring the email is sent reliably only after MFA enrollment is completed.

I want to ensure:

  • The email is sent only after MFA enrollment is successful.
  • Other actions in the Post-Login flow are not affected by the MFA enrollment logic.
    Here are my specific questions:
  1. How can I reliably detect that MFA enrollment has been completed within the Post-Login Action?
  2. How can I structure my Post-Login Action to ensure other actions run independently of the MFA enrollment logic?

If anyone has experience implementing this or can point me to relevant documentation/examples, I’d greatly appreciate it!

Thanks in advance for your help!

Hi @daniel.bozinovski,

At this moment, you cannot use Actions to determine when a user successfully enrolls into MFA. You can use Log Type Codes and subscribe to your tenants’ logs using a third-party log streaming service to check for the gd_enrollment_complete type and send an email using your email service.

However, if you think this would be a good addition, you can go to Product Feedback - Auth0 Community and create a Feature Request.
If you have any other questions, feel free to reach out.

Have a good one,
Vlad