In this guide we will be going through the process of migrating users from an external Authentication provider to SuperTokens.
There are 3 steps to user migration:
- Account Migration
- User Creation
- UserId Mapping
- Mark email as verified
- User Data Migration
- Session Migration
- Our first step involves creating a SuperTokens user by importing their account credentials from the previous authentication provider.
- You can learn more about how to implement these changes in the User Creation section.
- If you have stored information against existing userIds in your application table, you can use UserId Mapping to map the existing userId to the user's SuperTokens userId.
- Once the userIds are mapped you can use the existing userId to interact with all of SuperTokens APIs.
- You can learn more about how to implement these changes in the User Id Mapping section.
- Once a SuperTokens user has been created and their userId has been mapped, you need to mark their email as verified (if applicable) so that they do not have to go through the email verification process again.
- You can learn more about how to implement these changes in this section.
- Now that your user's account has been migrated over to SuperTokens we can associate additional information like roles and metadata with your user.
- You can learn more about how to implement these changes in the User Data Migration section.
- If you have users with an existing session, you can use this guide to migrate their external provider sessions to a SuperTokens session.
- This will prevent users from having to re-authenticate.
You can learn more about how to implement these changes in the Session Migration section.