# Auth0 console says email is verified, but auth0 user in app says email\_verified = false

**URL:** <https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728>\
**Category:** Get Help\
**Created:** [March 1, 2021, 11:09pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728 "2021-03-01T23:09:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![accountsjs.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/accountsjs.com/32/24937_2.png) [@accountsjs.com](https://community.auth0.com/u/accountsjs.com)\
**Post date:** [March 1, 2021, 11:09pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/1 "2021-03-01T23:09:35Z")

</div>

Has anyone ran into this before?

Edit: if I logout and login, my email is verified.

So maybe some kind of caching issue

> [@Endpoint /tokeninfo returns stale email\_verified value](https://community.auth0.com/t/endpoint-tokeninfo-returns-stale-email-verified-value/6368):
>
> I think this is more like an issue than a question. Here are the steps to reproduce the issue: Login with email/password to get id\_token Call endpoint /tokeninfo to get user information. The result will look fine. Change the email of the user, so a verification email is sent out. Click the link in verification email to verify the email change. Call endpoint /tokeninfo again. The problem is that email\_verified is false, although it shows email verified in Auth0 dashboard.

---

<div class="post-metadata">

**Author:** ![Ale](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale/32/50860_2.png) [@Ale](https://community.auth0.com/u/Ale)\
**Post date:** [March 2, 2021, 2:40am UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/3 "2021-03-02T02:40:02Z")

</div>

Hi Anthony,

Welcome to the Auth0 Community 🙂

How are you checking that email\_verified is true or false on your application?

I’m wondering if the problem here is that you are looking at the id\_token that you grabbed when you logged into your application. That would explain why the email\_verified value is not updated and why it gets updated after a log out and log in process.

Have you tried calling /userinfo from your application after verifying the user’s account?

---

<div class="post-metadata">

**Author:** ![accountsjs.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/accountsjs.com/32/24937_2.png) [@accountsjs.com](https://community.auth0.com/u/accountsjs.com)\
**Post date:** [March 2, 2021, 8:25pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/4 "2021-03-02T20:25:48Z")

</div>

@Ale

We attach the accessToken to our HTTP request (graphql) and then the backend uses that to get the user info

We use the @auth0/nextjs-auth0 “getSession” function to get the access token

I would think every new HTTP request should grab the latest session. So either auth0 isn’t giving us the latest session, or there is some kind of cloudflare caching issue?

This sounds pretty similar to the issue I’m having

> [@Check if email\_verified without signing in again.](https://community.auth0.com/t/check-if-email-verified-without-signing-in-again/7014):
>
> I’m currently using the v8 version of auth0.js I’m successfully able to find out if the user’s email is verified with this call function getUserInfo() { var deferred = $q.defer(); accessToken = localStorage.getItem('accessToken'); webAuth.client.userInfo(accessToken, function(err, userInfo) { if (err) { deferred.reject('Can not get user info'); } else { userInfo = userInfo; deferred.resolve(userInfo); } }); With this inf…

and here

> [@Calling user info endpoint returns stale information for email verified attribute](https://community.auth0.com/t/calling-user-info-endpoint-returns-stale-information-for-email-verified-attribute/6699):
>
> I’m using Auth0.js to call signupAndAuthorize, effectively storing an access\_token in localStorage and calling the HTTP API directly (not through Auth0.js) at /userinfo to get the email\_verified value for the user. I keep doing that every time the app starts. When I tried verifying the email though, I see it as true on the Raw JSON part of the Dashboard, but the calls to /userinfo keep returning email\_verified=false! This happens until I login again, then I get it as true. Why?

I guess we need to integrate with the management api and rely on that instead of using the decoded token?

---

<div class="post-metadata">

**Author:** ![Ale](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale/32/50860_2.png) [@Ale](https://community.auth0.com/u/Ale)\
**Post date:** [March 4, 2021, 3:17am UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/5 "2021-03-04T03:17:53Z")

</div>

@accountsjs.com you might be correct in your hypothesis:

> [@accountsjs.com](#):
>
> I would think every new HTTP request should grab the latest session. So either auth0 isn’t giving us the latest session, or there is some kind of cloudflare caching issue?

I didn’t have the time to test this but after taking a look at [https://github.com/auth0/nextjs-auth0/blob/main/V1\_MIGRATION\_GUIDE.md#getsession](https://github.com/auth0/nextjs-auth0/blob/main/V1_MIGRATION_GUIDE.md#getsession) and also [session/get-session | @auth0/nextjs-auth0](https://auth0.github.io/nextjs-auth0/modules/session_get_session.html) I think that there might be a problem with the getSession function you are using. It uses a cache system that might not be updating correctly.

The nextjs-auth0 SDK has been developed very recently so there’s the possibility of bugs like this one. Actually, I found a potentially related and reported bug: [Refetch additional user informations from the backend · Issue #316 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/316)

I encourage you to report this directly on the repo: [Issues · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues)

You could work around this issue by calling our [https://auth0.com/docs/api/authentication#get-user-info](https://auth0.com/docs/api/authentication#get-user-info) directly (preferred method since you should already have an Access Token if I understood correctly) or via our [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)

Let me know if all this makes any sense.

---

<div class="post-metadata">

**Author:** ![accountsjs.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/accountsjs.com/32/24937_2.png) [@accountsjs.com](https://community.auth0.com/u/accountsjs.com)\
**Post date:** [March 4, 2021, 6:00pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/6 "2021-03-04T18:00:34Z")

</div>

Thanks for taking time to research this.

---

<div class="post-metadata">

**Author:** ![accountsjs.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/accountsjs.com/32/24937_2.png) [@accountsjs.com](https://community.auth0.com/u/accountsjs.com)\
**Post date:** [March 4, 2021, 7:17pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/7 "2021-03-04T19:17:49Z")

</div>

Found this as well

[https://github.com/auth0/nextjs-auth0/issues/23](https://github.com/auth0/nextjs-auth0/issues/23)

---

<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 19, 2021, 7:17pm UTC](https://community.auth0.com/t/auth0-console-says-email-is-verified-but-auth0-user-in-app-says-email-verified-false/58728/8 "2021-03-19T19:17:50Z")

</div>

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