Skip to main content

About

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

Step 1) Account Migration:#

User Creation#

  • 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.

User ID Mapping#

  • 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.

Mark email as verified#

  • 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.

Step 2) User Data Migration#

  • 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.

Step 3) Session Migration#

  • 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.

Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI