Welcome to the Auth0 Community!
Indeed, as you have mentioned, this indeed can be accomplished by using Actions. Implementing this behaviour using Forms can be quite complicated and I believe that the simplest approach would be the simplest.
The code inside the action would look something like this:
exports.onExecutePostLogin = async (event, api) => {
if(event,user.email_verified != true) {
api.authentication.challengeWith({ type: 'email' };
}
};
Additionally, you can configure the Email
attribute inside the Database connection that you are using to force the users to verify their email when they sign up.
Otherwise, you should be able to customize the MFA screens using ACUL. The screens that you would need to customize are:
- Under the
mfa-email
prompt:
mfa-email-challenge
mfa-email-email
- Under the
email-verification
prompt
email-verification-result
Let me know if you have any other questions on the matter!
Kind Regards,
Nik