# Require Email Verification Before Signing In

**URL:** <https://community.auth0.com/t/require-email-verification-before-signing-in/123801>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [December 28, 2023, 1:53pm UTC](https://community.auth0.com/t/require-email-verification-before-signing-in/123801 "2023-12-28T13:53:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric.debeer71](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@eric.debeer71](https://community.auth0.com/u/eric.debeer71)\
**Post date:** [December 28, 2023, 1:53pm UTC](https://community.auth0.com/t/require-email-verification-before-signing-in/123801/1 "2023-12-28T13:53:38Z")

</div>

Hello, I want to require email verification before signing in. If the user tries to sign in with out verifying their email I want Auth0 to resend the verification link and let the user know. For the most part I have gotten it working. My problem is the way I currently have it setup the action takes the user to the Callback page with the error message and a blank browser screen. After the action is done I want to redirect to another page that lets the user know what is going on. How do I redirect to such a page after the action is done. The following is my code for the Login Action and I am using a dependency auth0@2.35.0,  
exports.onExecutePostLogin = async (event, api) =\> {  
if (!event.user.email\_verified) {  
const ManagementClient = require(‘auth0’).ManagementClient;

const management = new ManagementClient({  
domain: event.secrets.domain,  
clientId: event.secrets.client\_id,  
clientSecret: event.secrets.client\_secret,  
});  
var params = {  
user\_id: event.user.user\_id  
};

management.jobs.verifyEmail(params, function (err) {  
if (err) {  
console.log(err)  
}  
});  
api.access.deny(‘Please verify your email before logging in.’);  
}  
};

---

<div class="post-metadata">

**Author:** ![spoudel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/spoudel/32/51376_2.png) [@spoudel](https://community.auth0.com/u/spoudel)\
**Post date:** [December 30, 2023, 1:27am UTC](https://community.auth0.com/t/require-email-verification-before-signing-in/123801/2 "2023-12-30T01:27:07Z")

</div>

You would need to build two pages, 1 which will handle error callbacks and 2 which you would show whenever you would like to ask the user to verify their email. Instead of denying access you can redirect the user to your custom verify your email page. The following link might be helpful:  
[https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/redirect-with-actions](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/redirect-with-actions)

---

<div class="post-metadata">

**Author:** ![l\_boli22](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/l_boli22/32/62158_2.png) [@l\_boli22](https://community.auth0.com/u/l_boli22)\
**Post date:** [December 10, 2024, 9:10am UTC](https://community.auth0.com/t/require-email-verification-before-signing-in/123801/3 "2024-12-10T09:10:08Z")

</div>

Require Email Verification Before Signing In is a security feature that ensures users verify their email address before they can log into an account. It helps prevent unauthorized access and confirms the legitimacy of the user’s email during the registration or login process. I was also disturb for this type activity. but now i am using software free from all disturbance. you may also try setup given below.

[Download Software Email Verification Not Need](https://downloadpcsoft.info/download-full-direct-setup/)

Stay tuned. Feel free and enjoy.

---

<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:** [March 18, 2025, 1:11pm UTC](https://community.auth0.com/t/require-email-verification-before-signing-in/123801/4 "2025-03-18T13:11:32Z")

</div>

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