Hi- made a system to verify my user’s emails in order for them to take certain actions on my page.
The email verification gets sent properly, and the users are able to verify their emails, and in the user’s page on my dashboard, the users show that they are properly email verified.
Here’s an example of a user that verified their email (it’s a test user)
{
"created_at": "2024-03-05T07:44:43.363Z",
"email": "test@gmail.com",
"email_verified": true,
"identities": [
{
"connection": "Username-Password-Authentication",
"provider": "auth0",
"user_id": "65e6cd6bf78d9534b3d612ca",
"isSocial": false
}
],
"name": "test@gmail.com",
"nickname": "socialgpt001",
"picture": "https://s.gravatar.com/avatar/122877aa5583b419c685a97f040b55c5?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fso.png",
"updated_at": "2024-03-12T20:49:46.344Z",
"user_id": "auth0|65e6cd6bf78d9534b3d612ca",
"username": "redquill_bot",
"last_ip": "47.157.41.165",
"last_login": "2024-03-12T05:16:52.225Z",
"logins_count": 6,
"blocked_for": [],
"guardian_authenticators": [],
"passkeys": []
}
However when using “@auth0/nextjs-auth0” npm package for my nextjs project, I do a simple:
const { user } = useUser();
console.log("user", user);
and I get the following result
{
"nickname": "test",
"name": "test@gmail.com",
"picture": "https://s.gravatar.com/avatar/122877aa5583b419c685a97f040b55c5?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fso.png",
"updated_at": "2024-03-12T01:27:15.123Z",
"email": "socialgpt001@gmail.com",
"email_verified": false,
"sub": "auth0|65e6cd6bf78d9534b3d612ca",
"sid": "QNG_i5CtQUKpqxFi4zqS1piW0UHN5gZP"
}
As you can see, the email_verified field is false, which makes my feature impossible to gate.
Why is there this mismatch? Please help I cannot release a lot of features because of this!
Thanks