Verifying an Email Address Using an OTP Instead of a Link
This article explains how a user's email address can be verified with a One-Time Password (OTP) instead of a standard verification link.
- Verification Email
- OTP Code
This functionality is not supported out-of-the-box. The recommended method is to use the Verification Email (using Link) template to verify users.
However, a custom solution can be implemented as a workaround. This approach requires building the logic to issue and validate the code. The core components of this workaround include:
-
A custom service to generate and store the OTP, and to validate the code the user enters.
-
A call to the Management API to update the user's email verification status after a successful code entry.
-
A Post-Login Action that prevents users from completing the login process until their email address has been successfully verified with the OTP.