Duplicate users: duplicate emails as different users

Hi,

I am implementing Auth0 in one of my projects. I noticed it creates duplicate emails as different users. To explain in detail, I first created an account through Google Authentication. Then I created an account through the “Username-Password” option and registered the same email used through the Google Authentication. The new account creation was successful. I figured it would give me an error since a user with the same email signed up through Google Authentication. It did not show any errors and now the same email is used by two users.
I am not sure if this is a bug with Auth0 but this should not be happening. Essentially this is one user with two different accounts. Can someone please explain in detail what is happening and how to avoid it?

Thank you.

1 Like

Hi @eben456

This is expected as Auth0 treats every identity as unique (so the Google Authentication identity is unique from the “Username-Password” identity).

There are multiple ways you can deal with this, a couple of options are:

  1. Use the Auth0 identity merging (known as Linking User Accounts)
  2. Handle the two identities in your system by having a relationship between the identities and the user in your system

Hope this helps!

1 Like

Thank you for a quick reply. I will look into it.

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