Skip to main content

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.

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.
Show the conflict message next to the input the user just acted on (the email field, the connect-wallet button), not as a full-screen error. The user is signed in and nothing they’ve done is lost — only the new credential wasn’t added.

Handling errors

See also

  • Account merging — resolve a MergeAccountsConfirmationError end to end
  • Email & SMS OTP sign-in — the verification calls that also link credentials
  • Handling blocked wallets — the compliance-screening conflict
Last modified on July 15, 2026