¶ Migrate user to Authing with Lazy Migration
Update Time: 2022-11-08 15:05:22
¶ Migration Flow
Authing supports migrating user information from customized database to Authing database without stopping the server. When this function is enabled, the normal login and registration requests will be affected:
- The Authing will use your customized database script to authenticate user when he/she tries to login for the first time. The user information will be migrated to Authing database if the authentication succeeds or it will throw an error to notify the user that the account does not exist or the password is wrong.
- Users do not need to change their password
- When users try to login again, the authentication flow will use the Authing database.
- When all users are at least authenticated successfully for one time, the migration flow succeeds.
- When a user tries to register a new account, the script will check if the account already exists in the Authing database. If a same account is found, the script will throw an error to notify the user the account already exists.
- If the user is not in the Authing database, the
getUserinterface in the script will check if the user is in the customized database. If the same account is found, the script will throw an error to notify the user the account already exists.
- If the user is not found in both databases, the registration flow succeeds.
¶ Setup Scripts
You need to access Authing console (opens new window) and go to Connect IdP - Customized database to setup scripts of login and searchUser. You can find more details at:
¶ Test Migration Result
After you enabled the user migration function, you can test migrated users in following ways:
- Use admin API for getting user list or seraching users.
- Check users in User Management - User List of the Authing console (opens new window).
¶ After Migration
You need to disable the customized database after all migration work is done