Auth0 Home Blog Docs

User signs three different accounts and later linked the account


Let say if we have four social authorization button so the user can pick any of it. If the user picks SocialA button to log into the server, we use the user_id provided by auth0 to reference any data related to user. If the same user logins next time with a different social account say SocialB, we get new userId from Auth0 and new data will be stored as a reference to the user.

We totally want to avoid creating two auth0ids in our databases for same user and if the user later able to link the account which UserId would be his primary id?

Once the account is linked, do we need to update our database entry with primary user Id?