Prerequisites
Before this page: get a user signed in and, ideally, set up. Conflicts only arise while a user is authenticated and adding another credential to their account.What you’ll build
When a signed-in user adds a new credential — verifying another email or phone, connecting a social account, or linking a wallet — that credential is attached to their current account. But it might already belong to someone else. This page shows how to detect that conflict and guide the user to a resolution instead of failing silently. There are three outcomes the SDK surfaces, and each needs different UI:Linking uses the same verification calls you use to sign in —
verifyOTP for email/phone, the social verification flow, and wallet verification. When a user is already signed in, a successful verification links the credential; a conflict throws one of the errors above.Detecting and routing the conflict
Wrap the verification call and branch on the error type. The three cases map directly to three pieces of UI.- TypeScript
- React
Presenting each outcome
Mergeable (MergeAccountsConfirmationError). This is the only recoverable conflict. The error carries mergeConflicts — the fields where the two accounts disagree (for example, both have a display name). Confirm the merge with the user, let them pick a value for each conflicting field, and complete it. The full walkthrough lives in Account merging.
Wallet already taken (WalletAlreadyLinkedToAnotherUserError). The wallet is verified on another account, so it can’t be linked here. Tell the user plainly and offer an alternative (connect a different wallet, or sign in to the account that owns this one).
Can’t reassign (LinkCredentialError). A hard stop — the credential can’t be moved or merged. Keep the user on their current account and suggest using a different credential.
Handling errors
See also
- Account merging — resolve a
MergeAccountsConfirmationErrorend to end - Email & SMS OTP sign-in — the verification calls that also link credentials
- Handling blocked wallets — the compliance-screening conflict