Combine Federal Identity With User Pool

I was wondering how to merge users that have created an account but also logged in with Facebook. Currently, the user would see two different sets of notes even though the email is the same. Any thoughts? I googled it, but couldn’t quite figure out how to get it into the solution. I found this doc too… https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminLinkProviderForUser.html but again… not sure where to put that in the code base.

Yeah it’s horribly complicated. The key with this API is that you need to call it before the external users (FB user) is created. You would need to use this in a Lambda function in your backend. So use the email you get from Facebook to check if a user already exists, then call this API to link the FB account with the existing one. Now when the user logs in, they would log into the existing account.