About
This guide explains how to migrate users from an external authentication providers like Auth0
to SuperTokens.
Migration involves two main steps:
- Account Migration
- Session Migration
#
Step 1) Account Migration:In the first step, use the Bulk User Import API to create a SuperTokens user for each user in your existing authentication provider. This API allows you to:
- Create a SuperTokens user.
- Map the existing userId to the SuperTokens userId.
- Mark the email as verified (if applicable).
- Add roles, metadata, and MFA devices (if applicable).
- Link multiple login methods for the same user (if applicable).
For implementation details, refer to the Bulk User Import section.
#
Step 2) Session MigrationIf users have active sessions, use this guide to migrate their external provider sessions to SuperTokens sessions. This way, users won't need to re-authenticate.
Learn how to implement session migration in the Session Migration section.