email_verified
field of a user profile indicates whether the user has verified their email address. Email verification is optional, but valid email addresses are required for certain actions, such as sending email communications, password reset/recovery links, and magic links to users.
An email is usually verified immediately after the user account is created or when the user logs in to the application for the first time. It’s a good way to know that the person signing up actually owns the email at that moment.
Since email verification happens once at that specific moment, we can’t ensure that a person who logs in with the user account at a later time still owns the email address that was verified.
In case of federated , they sometimes report if the user has a verified email, and based on that, Auth0 sets the email_verified
field in the user profile. This, however, transfers the responsibility to the identity provider to do it properly - something we can’t ensure. We also don’t know if the verified email from that provider is still owned by the user.
For all of these reasons, we need to be careful on what we can assume based on a verified email.
email_verified
field will match what the identity provider returns in the user profile. If they identity provider does not return any value, it will be set to false
.
john.doe@travel0.com
and a password. Months later, John Doe leaves Travel0, and a new John Doe is hired, with the same email account. That person goes to the same website, and authenticates with his corporate identity provider (such as Google Workspace), and gets the account automatically linked to the other user.email_verified
field before performing account linking, to mitigate scenarios like:
attacker@gmail.com
.victim@hotmail.com
).user@acme.com
account shouldn’t be granted access to the same feature set that a user authenticating with acme.com’s corporate directory.