Auth0 Home Blog Docs

Gmail and Auth account generate 2 different accounts



I logged in to my site with a test user providing a user and a password, verified the email as gmail account. For the coming days, auth0 recognize I was logged in and I am able to login with my gmail account.

Few days passes, I try to login again, I am not recognized and when I try to login with my gmail account it sees this as a different user.

If I look at my user dashboard I now sees 2 users, the first the logged with a user/name password and the second user with the google open id token. Both has the same email… this is the same user…

How can I solve this?


The behavior you describe between a user identity associated with a database connection (service specific username/email and password credentials) and a user identity associated with Google social credentials is the expected one.

By default the user identities are independent and treated as different users even if they happen to be used by the same person (same email address even). If you want your application to allow username/email and password credentials alongside social providers while still treating users with the same verified email address as one identity then you need to perform account linking. See the reference documentation for additional information, but if you scenario revolves around automatic account linking for identities that have the same verified email address then you can accomplish that through a rule (check the available templates).