Migrate user using social logins from one tenant to another

Hi everyone! My case is I need to migrate current user who are social logins(google & apple) from current tenant( tenant A) to a new one ( tenant B), for username and password user we would do a lazy migration and then bulk user import, we are still considering if we should raise a support ticket for password import or let the user to reset their password. However for social login users I am thinking to import all the users with their email address and give each user a randomly generated password. When a user tries to sign in via google or apple, it would be a brand new social sign up. We would then need to go link that new social connection to the imported user with the randomly generated password.

As for data in my legacy DB, people in the community are suggest to use Rules to pull the data from legacy DB and save it to user’s metadata, however Rules are pretty much deprecated, does Application do the same thing? or I should seek alternative solution? Thanks in advance!

Hi @jialin.yang,

Welcome to the Auth0 Community and sorry for the late reply.

Your approach looks quite solid, so since you have already mentioned the possibilities of migrating your users to the new tenant, when it comes to the social login users I just wanted to add that that the best practice would be using Account linking with Actions, while an explained example can be found under the documentation.

When it comes to migrating user information, you can also use Actions and set the new values from your old database using api.user.setUserMetadata or api.user.setAppMetadata. This example might also be handy.

Answered this since it might help others as well.
Thanks,
Remus

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.