Documents
User Credentials
Manage user credential operations
Account Merge (Credential-based)
Reassign user_credential.user_id to merge login methods to a target account
Terminology
- User (users): The account data in the service. Notes, subscriptions, teams, credits are all linked to
users.id(userId). - UserCredential (user_credential): Login method. Google/Apple/Local (email+password) authentication providers.
- user_credential.user_id: Determines which User account a login method connects to.
What this feature does
Changes
user_credential.user_id so that logging in with sourceEmail will route to targetEmail's userId.Does NOT automatically delete/merge duplicate User (account data). Only the login routing changes.
Constraints
- targetEmail must have a credential linked to a userId
- targetEmail cannot be linked to multiple userIds (data inconsistency)
- sourceEmail must have at least one credential
Reassign User ID
Move sourceEmail's credentials to targetEmail's userId