The React SDK supports linking all supported account types via our modal-guided link methods.
To prompt a user to link an account, use the respective method from the 
Below is an example button for prompting a user to link an email to their account:
useLinkAccount hook:Users are only permitted to link a single account for a given account type, except for wallets and passkeys. Concretely, a user may link at most one email address, but can link as many wallets and passkeys as they’d like.

Callbacks
You can optionally register anonSuccess or onError callback on the useLinkAccount hook.({user: User, linkMethod: string, linkedAccount: linkedAccount}) => void
Optional callback to run after a user successfully links an account.
(error: string) => void
Optional callback to run after there is an error during account linkage.
Looking for whitelabel
link methods? Our useLoginWith<AccountType> hooks allow will link an account to a user, provided that the user is already logged in whenever the authentication flow is completed. For headless wallet linking with useLinkWithSiwe or useLinkWithSiws, see the whitelabel user management documentation.Linking additional OAuth accounts
ThelinkOAuth method allows your app to link additional OAuth providers that are not natively supported by Privy. For built-in providers like Google or Twitter, use the dedicated methods (e.g., linkGoogle, linkTwitter).Parameters
ThelinkOAuth method accepts an object with the following fields:string
required
The additional OAuth provider to link, in the format
'custom:<provider-name>' (e.g., 'custom:twitch').Linking passkeys
ThelinkPasskey method accepts an optional object with the following fields:Parameters
string
An optional display name to associate with the passkey. This name is shown to the user in their password manager (e.g. Google Password Manager, iCloud Keychain) when selecting which passkey to use for authentication. If not provided, the passkey defaults to your app name configured in the Privy Dashboard.
Linking custom JWT accounts
If your app uses an external JWT-based authentication provider, use theuseLinkJwtAccount hook to link a custom JWT account to an already-authenticated Privy user. Unlike the methods above, this hook is headless: you provide the JWT yourself and Privy verifies it on the server.Parameters
string
required
The JWT issued by your external authentication provider to link to the user’s account.
State
Thestate property tracks the current state of the JWT linking flow:Callbacks
You can optionally passonSuccess and onError callbacks into useLinkJwtAccount:Custom JWT authentication must be enabled in your Privy Dashboard before using this hook. See the JWT-based authentication setup docs for instructions.

