Email verification via OTP

Continuing the discussion from Sending Verification Email with OTP Code:

My question is, what is the ‘service’ mentioned above? Is it part of an action flow? My goal is to keep users on the device they initiated the process (signed up) while verifying their email on any other browser/device. This way, they can enter the OTP on the original screen and continue from there. What is described above sounds like a solution for us but I am not sure what that service is.

Thank you.

Hi @chris.howell

The article mentioned above is referring to sending OTP verification emails to existing users. However, this feature is available for when a user signs-up. In order to enable the email verification with one time code you will need to do the following:

  • Identifier First for your Authentication Profile: Authentication → Authentication Profile → Identifier First → Save

  • Go to Authentication → Database that you are using for your application → Attributes → Email → Configure → Have One-Time Password Selected → Allow sign-up with email -Required → Verify Email on Signup - Enabled

After enabling this, your new users will be asked to verify the emails on signup prior to creating their password.

However, this will not be the case for users which already have an account. For those users, as mentioned in the article, you will need to create a Post-Login Action to force those users to verify their email in order to log in. For that, you will need to incorporate a custom solution. This can be accomplished by using a custom domain and implementing custom logic either in your application or using an Action/Flow. Otherwise, any verification email sent to existing users will be a magic link.

If you have any other questions, feel free to leave a reply on the post!

Kind Regards,
Nik