# Verified Email flag

**URL:** <https://community.auth0.com/t/verified-email-flag/86567>\
**Category:** Get Help\
**Created:** [July 7, 2022, 5:04am UTC](https://community.auth0.com/t/verified-email-flag/86567 "2022-07-07T05:04:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex34](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alex34/32/33806_2.png) [@alex34](https://community.auth0.com/u/alex34)\
**Post date:** [July 7, 2022, 5:04am UTC](https://community.auth0.com/t/verified-email-flag/86567/1 "2022-07-07T05:04:16Z")

</div>

How would I set a “verified” email flag in Auth0? I suppose I can just set it as User meta data but how would I actually get Auth0 to respect that flag in the login process?

That is - to deny logins where the “verified” flag is FALSE.

I know that Auth0 provides some email verification but I honestly would rather keep the integration lighter as it has been quite painful thus far.

Thanks!

---

<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:** [July 8, 2022, 8:34pm UTC](https://community.auth0.com/t/verified-email-flag/86567/3 "2022-07-08T20:34:04Z")

</div>

Hi @alex34,

Thanks for reaching out to the Auth0 Community!

I understand you would like to set the `email_verified` property for your users and deny access if they are unverified.

In this case, I recommend using an [Auth0 Post-Login Action](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow#access-control) to deny a user access if their email address is not verified. For example:

```auto
exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email_verified) {
    api.access.deny(`Access to ${event.client.name} is not allowed.`);
  }
};

```

Note that the `email_verified` property is part of the [user’s root profile attributes](https://auth0.com/docs/manage-users/user-accounts/user-profiles/normalized-user-profile-schema), and there is the option to change this property by calling the Management API[Update a user endpoint](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id).

I hope this helps!

Please let me know if there’s anything else I can do to help.

Thank you.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 21, 2022, 4:13pm UTC](https://community.auth0.com/t/verified-email-flag/86567/4 "2022-12-21T16:13:46Z")

</div>


