# Auth0 Require Email Verification - Breaks Registration

**URL:** <https://community.auth0.com/t/auth0-require-email-verification-breaks-registration/123313>\
**Category:** Get Help\
**Tags:** email-verification, user-management\
**Created:** [December 18, 2023, 6:42pm UTC](https://community.auth0.com/t/auth0-require-email-verification-breaks-registration/123313 "2023-12-18T18:42:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott14](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@scott14](https://community.auth0.com/u/scott14)\
**Post date:** [December 18, 2023, 6:42pm UTC](https://community.auth0.com/t/auth0-require-email-verification-breaks-registration/123313/1 "2023-12-18T18:42:54Z")

</div>

Hello all,

I wanted to implement requiring email verification for users. I’ve read the documentation and created a post-login action that has the following code:

```auto
exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email_verified) {
    api.access.deny('Please verify your email before logging in.');
  }
};

```

The problem is that nowhere does the user see the message when they try to login (as the demos show) without verifying email.

Using React front-end with .net core back.

Thank you!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 19, 2023, 12:05am UTC](https://community.auth0.com/t/auth0-require-email-verification-breaks-registration/123313/3 "2023-12-19T00:05:31Z")

</div>

Hi @scott14,

Welcome to the Auth0 Community!

The error message will appear in the URL of the browser window.

If you need to present a clear error message, please consider redirecting your users to a custom hosted error page.

Please let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 2, 2024, 12:05am UTC](https://community.auth0.com/t/auth0-require-email-verification-breaks-registration/123313/5 "2024-01-02T00:05:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
