# Email OTP login using "verify\_email\_by\_code" template instead of "auth\_email\_by\_code"

**URL:** <https://community.auth0.com/t/email-otp-login-using-verify-email-by-code-template-instead-of-auth-email-by-code/203597>\
**Category:** Get Help\
**Tags:** otp, email-template, bug, login\
**Created:** [September 23, 2026, 7:14pm UTC](https://community.auth0.com/t/email-otp-login-using-verify-email-by-code-template-instead-of-auth-email-by-code/203597 "2026-09-23T19:14:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahid.Rosas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sahid.rosas/32/71203_2.png) [@Sahid.Rosas](https://community.auth0.com/u/Sahid.Rosas)\
**Post date:** [September 23, 2026, 7:14pm UTC](https://community.auth0.com/t/email-otp-login-using-verify-email-by-code-template-instead-of-auth-email-by-code/203597/1 "2026-09-23T19:14:09Z")

</div>

While testing the login flow in my application, I noticed my custom template for auth\_email\_by\_code (Authentication Email (Code)) was not being used during login after sending the code. Instead, verify\_email\_by\_code (Verification Email (Code)) was being used. I was able to confirm this by using my custom template for verify\_email\_by\_code (Verification Email (Code)).

“Email OTP for login” was active and both templates were enabled.

Am I misunderstanding the usage of these templates, or is there a misconfiguration somewhere?

Any answers are greatly appreciated!

---

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [September 24, 2026, 5:47pm UTC](https://community.auth0.com/t/email-otp-login-using-verify-email-by-code-template-instead-of-auth-email-by-code/203597/3 "2026-09-24T17:47:01Z")

</div>

Hi @Sahid.Rosas

Thank you for reaching out to us!

I understand that during login with “Email OTP for login” enabled, your custom `auth_email_by_code` (Authentication Email (Code)) template was not being used; instead, the `verify_email_by_code` (Verification Email (Code)) template was applied.

**Possible cause**

When a user attempts to log in using “Email OTP for login” and their email address has not yet been verified (`email_verified: false` in their user profile), Auth0 prioritizes the email verification step. Because of this, Auth0 triggers the **[Verification Email (Code)](https://auth0.com/docs/customize/email/email-templates#:~:text=join%20the%20organization-,Verification%20code%20email,-You%20have%20enabled)** (`verify_email_by_code`) template to verify the email address while simultaneously handling the authentication step.

Once the user successfully inputs the code from that first email, their profile is updated to `email_verified: true`.

**The Solution / Next Step:**

To see your custom `auth_email_by_code` template in action, you can test the login flow using an existing user account that already has `email_verified: true`. For all subsequent logins by verified users, Auth0 will bypass the verification requirement and correctly trigger the **Authentication Email (Code)** (`auth_email_by_code`) template instead.

Please let us know if this helped overcome your issue!

Best regards,  
Gerald

---

<div class="post-metadata">

**Author:** ![Sahid.Rosas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sahid.rosas/32/71203_2.png) [@Sahid.Rosas](https://community.auth0.com/u/Sahid.Rosas)\
**Post date:** [September 25, 2026, 6:16pm UTC](https://community.auth0.com/t/email-otp-login-using-verify-email-by-code-template-instead-of-auth-email-by-code/203597/4 "2026-09-25T18:16:56Z")

</div>

Hi @gerald.czifra

Thank you for the response!

Upon further testing I have confirmed that this is still happening even when attempting to log in via email OTP using a verified account.

Any more input about this behavior or, if it can be replicated would be appreciated. 🙌
