# User Lazy Migration

Only Enterprise Edition users can use the custom database connection function. For details, please see https://authing.cn/pricing (opens new window). If you want to try it, please contact 15559944612 or sales@authing.cn.

# Migration process

Authing supports the smooth migration of users from a custom database to Authing in a non-stop manner. When this function is enabled, it will have the following effects on login and registration requests:

Authentication request:

-When the user authenticates for the first time, the user will be authenticated with the custom data script you configured. After the authentication is successful, it will be migrated to the Authing database, otherwise it will prompt that the user does not exist or the password is incorrect. -The user does not need to modify the account password. -The next authentication of the user will go to the Authing database. -When all users have been successfully authenticated at least once, it marks the smooth completion of the database migration.

Registration request:

-When the user registers, it will first check whether it exists in the Authing database, and return an error message if it already exists. -If the user does not exist in the Authing database, check whether the user exists in the custom database through the getUser interface, and return an error message if it already exists. -If the user does not exist in the Authing database and the custom database, the registration is successful.

# Configuration script

You need to write login and search on the Authing console (opens new window), Connect Identity Source-Custom Database page User script, please see:

# Verify the migration effect

After you enable user data migration, you can verify the completely migrated users in the following ways:

-Use Management API for obtaining user list or searching for users. -View users on the Authing console (opens new window) User Management-User List page.

# After the user migration is complete

When all users have been migrated, close the custom database.

# Next

Next you can:

Learn about our recommended best practices:

Best Practices