How to merge AWS Cognito identities

962 views Asked by At

I saw the official blog post for Unity games, using HandleDatasetMerged callback. I can't find corresponding for PHP and Javascript SDK.

How can I merge 2 cognito identites? Initally 1 identity was created without any Logins in the cognitoParams. Subsequently user login with Facebook and another identity is created for 'graph.facebook.com'.

1

There are 1 answers

0
Albert Vaca Cintora On

If the user previously had an unauthenticated identity, when getting credentials with a Facebook token, they will be migrated to an authenticated identity and their identity ID might change. The Javascript and PHP SDKs, unlike Unity, iOS and Android, don't provide an event for Identity changes, so you will have to handle that case yourself. If there was an identity change, you will need to "move" the data linked to your previous identity to the new one, if any.