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:
- User 1 sign up by using google (Login into the system)
- 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:
- Logout User 1.
- Have User 1 sign up again but this time with a new social media as User 2. Save User 2’s uid somewhere
- Link them up by using the POST
/api/v2/users/{id}/identities
API - 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!