Auth0 Logs Show Two Emails Under the Same Google User ID

Overview

This article explains why an Auth0 user appears in the logs with two different email addresses under the same Google user ID. This behavior occurs when a user initially signs in with a non-Gmail Google account and later adds a Gmail address to that same Google account. The observable symptom is that the Auth0 logs display the same Google user ID associated with two distinct email addresses.

Applies To

  • Auth0
  • Google Social Connection
  • Logs

Cause

This happens if a user signs in with a Google account created with a non-Gmail email address, logs out of Auth0, and then navigates to Gmail. Google requires the user to create a @gmail.com email account. When the user logs in to Auth0 again, Auth0 retains the same Google user ID but updates the email address to the newly created Gmail address.

Solution

Why does Auth0 update the email address for the same Google user ID?

Auth0 uses the unique user ID provided by Google to identify the user. When the user authenticates, Auth0 updates the user profile with the latest information provided by the Google identity provider. Because the user added a Gmail address to the existing Google account, Google sends the new @gmail.com address during the next login. Auth0 correctly retains the existing user ID and updates the email address to match the current Google profile. This is the expected behavior, and administrators do not need to take any action.

Recommended content

No recommended content found...