Azure B2c provides a lot of samples for custom policies, this case the one that I am trying to implement is the following: https://github.com/azure-ad-b2c/samples/tree/master/policies/auto-account-linking
This is my version of the AccountLinkExtensions.xml: https://pastebin.com/WGerhQkZ
In my version I removed the steps of "HandleLinkLocalToSocial" subjourney from 1 to 7.
For the sake of simplicity, ignore the microsoft and twitter implementation (twitter for now does not work).
Current Behavior:
---Google---
- SSO with google account will merge with existing local account if the email is the same
- If local account doesn't exist, create a local account and link it to the google account, using the email address as a "primary key".
---Apple---
*SSO with Apple account, creates a new local account linked to apple account regardless if there is already a local account. This means the same local account will exist linked to apple and standalone if the local account already existed.
Expected Behavior:
- When doing SSO with a IDP, it will merge with the existing local account.
- If local account does not exist, create a local account and link it to the idp (using email address as "primary key").
Basically I am confused on why with my current implementation, the Apple SSO behaves differently from the Google SSO