We built OAuth identity server using .net core with IdentityServer4 nuget package. We added support for facebook token support. So identity server will exchange facebook token with internal token using facebook graph API (https://graph.facebook.com/v2.8/me). Now we have requirement to merge two user if both have same email address.
Can you please suggest how to integrate this feature in our identity server? Is there any built in support or best practice to implement this?
As per the identityserver documentation:
Our quickstart UI funnels all external authentication calls through a single callback (see ExternalLoginCallback on the AccountController class). This allows for a single point for post-processing. Federation Gateway Docs on Identityserver.io
So even if you're not using the QuickstartUI you can download it an inspect how are they configuring things to make the external authentication flow end on that controller and from there do all your checks (if there's a local user with same email) and associate the user with this "External Auth Record"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With