Migration¶
You can keep your existing users and data when you move from another authentication system to Authany.
We support migration from just about any authentication system, including services like Auth0 and a custom built authentication system. Whether you're leaving your existing authentication provider because your license is expiring soon or the system is being deprecated, you can seamlessly move to Authany and keep your user data.
For more peace of mind and to avoid the feeling of being locked into Authany as a provider, Authany also allows you to seamlessly export your user data.
In this article, we'll cover all the best strategies and best practices you can use to migrate your users from other identity providers to Authany.
Migration Strategies¶
Generally, migration to Authany is as simple as importing your user data to Authany and then updating your app to use Authany sessions. You can migrate all your data at once or do it gradually, depending on what approach works best in your specific use case.
We recommend these three approaches for migrating user data into Authany:
- Bulk migration
- Rolling migration
- Zero-Downtime migration
1. Bulk migration¶
The bulk migration strategy allows you to import all your users to your Authany project at once.
Bulk migration is ideal when you want to stop using your old authentication system immediately. For example, in a scenario where the license on your existing system is expiring or the product is being deprecated.
Pros¶
- Bulk migration is the most straightforward approach.
- It allows you to stop using your old system as quickly as possible.
Cons¶
- It requires some downtime while you are moving from the old system to Authany.
For detailed steps on bulk migration, see:
2. Rolling deployment¶
The rolling deployment approach allows you to move some portion of your users (e.g., users in a specific region) to Authany, or only allow new users to sign up via Authany.
Pros¶
- Rolling deployment allows a slow transition with controllable user impact or downtime.
Cons¶
- It means indefinitely support for your old authentication system.
Note
For new users who go through the new sign-up flow using Authany, a record in the legacy system should be in place to handle an edge case where the user tries to log in on another device with an older app version.
3. Zero-Downtime migration¶
The Zero-Downtime migration ensures users remain logged in to your application throughout the migration from your legacy system to Authany.
In Zero-Downtime migration, Authany seamlessly creates new sessions from external access tokens provided by your legacy authentication system.
Pros¶
- Users are not logged out. Hence, there is no need for them to repeat login.
Cons¶
- More complex setup and deployment.
The following flow diagram explains a typical authentication flow using the zero-downtime migration approach:

Zero-downtime migration flow diagram