Migrating social accounts (Google, Facebook) using AWS Cognito Migration Triggers
Asked Answered
S

1

7

We have a Cognito user pool that we'd like to migrate to a new User Pool to take advantage of some different configuration. However, our pool contains users signed up with email, Google, and Facebook.

I understand how to migrate email/password accounts, but I do not understand how social accounts should be migrated.

From this issue, I can see that there's no way to use a different auth flow, so I'm guessing there's also some limitation surrounding social accounts as well?

One method that we had thought of would be to actually manually import the social accounts. Is this the correct way to handle migrating social accounts to a new pool? Is there a different "AWS Sponsored" method? Any help would be appreciated!

Thanks!

Skyros answered 10/6, 2021 at 4:23 Comment(3)
Hello @Skyros did you find a solution ?Thermotaxis
Please share the results If you had found the answer.Frith
Did you find a solution for this? Please shareBouchard
S
2

Commenting back with a solution that ultimately would have worked, but we are now starting to pick up a different auth provider instead, so opted not to do this.

The method that we would have used is to create the user in the new Cognito pool as a Cognito Native user. Then, during social sign in, you simply need to link the social account to the Cognito Native user.

For anyone just starting out with Cognito, I would highly recommend that you set up your presignup trigger to always create a Cognito Native user for each social sign in and link the accounts together right away. This will save you an enormous headache later on when you have duplicate accounts or need to migrate.

For reference, this answer describes how to set up the presignup trigger to handle the linking.

Skyros answered 28/6, 2022 at 0:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.