Linking multiple accounts flow

Hey Auth0,

I have some questions regarding account linking. I have been referring to the following guides:
Link User Accounts and User-Initiated Account Linking: Client-Side Implementation

To my understanding from the guides, two accounts existence is needed prior to the linking. So I am a bit confused with the authorization flow here. My user story flow is as below:

  1. User 1 sign up by using google (Login into the system)
  2. User 1 will link their Facebook account to the their existing account in Auth0.

As User 1 do not have any existing Facebook account in Auth0 yet, I assume I will need to create a new user to Auth0 that consist of the new Facebook identity. As far as I can tell from the POST /api/v2/users API and PATCH /api/v2/users/{id} API, I do not have the access to create/update the identities of User.

Which brings me to the conclusion, that I will need to:

  1. Logout User 1.
  2. Have User 1 sign up again but this time with a new social media as User 2. Save User 2’s uid somewhere
  3. Link them up by using the POST /api/v2/users/{id}/identities API
  4. Relogin as User 1

Am I missing some functionalities provided by Auth0 to link the identities programatically in a more straight forward manner?

I apologise if I am asking something obvious.

Thanks in advance!

2 Likes

Hello @ztchia!

This is something that can be done by implementing a rule, or using our account linking extension.

Thank you!

1 Like

The link to the rule is broken - is that something we can maybe fix?

Hi @alexab, the rule used to link accounts is no longer available, the options for account linking are the ones listed here: https://auth0.com/docs/users/link-user-accounts
thanks!

2 Likes

Thanks for helping on this one Karen!

1 Like

Hi @karen.bermudez

I have used the Auth0 Account Link extension to link my social connection to the default database connection. I got to the UI where Auth0 Account Link extension asked to to select continue to link accounts. However in my Auth0 dashboard, I am still seeing two users with the same email address but one user showing google-oauth2 connection and the same user with a database connection. Please let me know how I can fix this? Thanks very much!

Hi @dori_wm thank you for your patience!

Seems that the account linking was not successful, could you please try to link them again?
Also, if the problem persists, could you please share some screenshots?

Thanks!

2 Likes