# When user verifies their email event?

**URL:** <https://community.auth0.com/t/when-user-verifies-their-email-event/65869>\
**Category:** Get Help\
**Tags:** api, login, auth0\
**Created:** [July 9, 2021, 8:02am UTC](https://community.auth0.com/t/when-user-verifies-their-email-event/65869 "2021-07-09T08:02:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milos.spasovski](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/milos.spasovski/32/12765_2.png) [@milos.spasovski](https://community.auth0.com/u/milos.spasovski)\
**Post date:** [July 9, 2021, 8:02am UTC](https://community.auth0.com/t/when-user-verifies-their-email-event/65869/1 "2021-07-09T08:02:20Z")

</div>

Hello everyone I am new here and this is my 3rd post here, hopefully I will get an answer.

Does Auth0 have or support an onConfirm event, to explain it more in detail. When a user gets their verification email and they click the confirm link I want to add their email to a mailing list. Will that be possible?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 9, 2021, 9:47pm UTC](https://community.auth0.com/t/when-user-verifies-their-email-event/65869/3 "2021-07-09T21:47:30Z")

</div>

Hi @milos.spasovski,

There isn’t a specific _onConfirm_ hook, but you can set something similar up with an action.

You can create an action that checks if the user is verified and has been added to your mailing list on login.

If the user has not been added and has been verified, you can add them to your mailing list and set the flag to `true`.

Here’s an example:

```javascript
exports.onExecutePostLogin = async (event, api) => {
  if (event.user.email_verified && event.user.app_metadata.email_added) {
    console.log(`Skipping email_added because it already occurred for ${event.user.email}.`);
    return;
  }
  // add them to your mailing list
  api.user.setAppMetadata("email_added", true);
};

```

This is just an example of how you could do it, make sure to test that everything is working correctly before you move to production.

---

<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:** [July 24, 2021, 9:47pm UTC](https://community.auth0.com/t/when-user-verifies-their-email-event/65869/4 "2021-07-24T21:47:47Z")

</div>

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