# Auth0 log me out after backend set email verified equal true

**URL:** <https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485>\
**Category:** Get Help\
**Tags:** signup-prompt-new-experience, login-experience\
**Created:** [July 23, 2024, 7:46am UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485 "2024-07-23T07:46:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenchang.lew](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chenchang.lew/32/48771_2.png) [@chenchang.lew](https://community.auth0.com/u/chenchang.lew)\
**Post date:** [July 23, 2024, 7:46am UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/1 "2024-07-23T07:46:27Z")

</div>

Hi, we decided to implement our email verification in the backend after user signup. Once the email is verified, we send a patch request to the Auth0 server to set `email_verified` to `true`:

```auto
auth0_management_request(
    f"users/{user_account_of_email_verified}",
    {"email_verified": True},
    tenant,
    "PATCH",
)

```

However, after doing this, the frontend automatically logs out the user, requiring them to log in again.

I have checked this post: [Email verification without re-login](https://community.auth0.com/t/email-verification-without-re-login/118096), but the reply only mentions that:

```auto
That is the expected behavior. When you update a user’s email address, the user is logged out from your app and asked to provide their credentials to log in again.

```

My question is: Does updating `email_verified` also log out of the user? If so, how can we bypass this behavior?

Thanks

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 23, 2024, 12:54pm UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/2 "2024-07-23T12:54:05Z")

</div>

Hi @chenchang.lew

Welcome to the Auth0 Community!

Can you send me a DM with your tenant name?

Thank  
Dawid

---

<div class="post-metadata">

**Author:** ![chenchang.lew](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chenchang.lew/32/48771_2.png) [@chenchang.lew](https://community.auth0.com/u/chenchang.lew)\
**Post date:** [July 26, 2024, 4:26pm UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/5 "2024-07-26T16:26:37Z")

</div>

Hi @dawid.matuszczyk

I sent you a DM with my tenant’s name three days ago but haven’t received a reply yet. Could you confirm if I sent it to the correct place or if you have received it?

Thank you,  
Chen Chang Lew

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 29, 2024, 10:32am UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/6 "2024-07-29T10:32:08Z")

</div>

Hi @chenchang.lew

I apologize for the late response; I missed your message in my inbox. I’m in touch with Developer Support team, I will get back to you as soon as they respond.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![chenchang.lew](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chenchang.lew/32/48771_2.png) [@chenchang.lew](https://community.auth0.com/u/chenchang.lew)\
**Post date:** [August 7, 2024, 8:43am UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/7 "2024-08-07T08:43:32Z")

</div>

Hi @dawid.matuszczyk. Thanks for the recent reply and solution given by the Developer teams.

As your suggestion to

> toggle in your Tenant Settings → Advanced section of your dashboard with the flag Delete Session User Email Verified Deprecation and it should be off.

* * *

## However, I didn’t see any setting related to “Delete Session User Email Verified Deprecation” in my tenant’s setting. Here are the settings I currently have: ![image](https://global.discourse-cdn.com/auth0/original/3X/2/f/2ffdca6c3e40784abd6a1049d02482893e22fa59.png) ![image](https://global.discourse-cdn.com/auth0/original/3X/3/0/308f83b548ece5898b80ea6f347e4a2212feab63.png)

But here is the interesting thing,  
For the tenant: dev-bcyjnx8u, we can now register & without being logged out after the backend set email verified = true.  
However, after I merge my code into staging environment, (Tenant: akina-care-stg)  
We have the same problem that it logged us out again.  
I have checked the tenant setting in the advanced section, both tenants have the same settings.

Can I know what did I miss? Plus, I am afraid this will also happen to my production tenant (akina-care-production) as well, can I know what should I do?

Thanks and looking forward to hearing from you

---

<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:** [August 21, 2024, 8:44am UTC](https://community.auth0.com/t/auth0-log-me-out-after-backend-set-email-verified-equal-true/139485/8 "2024-08-21T08:44:03Z")

</div>

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