Skip to main content
Privy enables complete control over user management flows, so you can match every user action to your app’s brand and experience. Build your own UI for linking and unlinking accounts, managing user profiles, and more, while Privy handles the backend logic securely.
Privy supports whitelabeling user management for linking and unlinking accounts.
To whitelabel linking social accounts, use the useLinkAccount hook and call link<Provider>.
To link additional OAuth providers that are not natively supported by Privy, use the linkOAuth method from the useLinkAccount hook. For built-in providers like Google or Twitter, use the dedicated methods (e.g., linkGoogle, linkTwitter).

Parameters

The linkOAuth 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').

Usage

To whitelabel linking wallets, use the useLinkWithSiwe hook for Ethereum wallets or useLinkWithSiws hook for Solana wallets. These hooks allow you to generate messages, request signatures, and link wallets without using Privy’s modal UI.
To link an Ethereum wallet to a user via SIWE, use the React SDK’s useLinkWithSiwe hook.

Generate SIWE message

Sign the SIWE message

Request an EIP-191 personal_sign signature for the message returned by generateSiweMessage from the wallet.
Alternatively, you can request a signature from any external wallet or smart account:

Usage

Callbacks

You can optionally pass callbacks into useLinkWithSiwe:
To whitelabel updating a user’s email address, use the useUpdateEmail hook:

Send an OTP

First, use the sendCode method to send an OTP verification code to the user’s new email address:
This sends a one-time passcode to the new email address, which the user must enter to verify and confirm the update.

Verify the OTP

Prompt the user for the OTP they received and verify it using the verifyCode method:

State

The state property provides the current state of the OTP flow:

Usage

Callbacks

You can optionally pass callbacks into useUpdateEmail:
To link a custom JWT account to an existing user, use the useLinkJwtAccount hook. This is useful for integrating with external authentication systems that issue JWTs.
string
required
The JWT token from your external authentication system to link to the user’s account.

State

The state property tracks the current state of the JWT linking flow:

Callbacks

You can optionally pass callbacks into useLinkJwtAccount:

Usage

Custom JWT authentication must be enabled in your Privy Dashboard before using this hook. See the JWT-based authentication documentation for setup instructions.
To whitelabel unlinking an account, use the dedicated unlink hooks from @privy-io/react-auth:
See the unlinking accounts guide for the full list of available hooks and parameters.
To unlink any OAuth provider, including built-in providers (e.g., 'google', 'twitter') and additional OAuth providers (e.g., 'custom:twitch'), use the useUnlinkOAuth hook.

Parameters

The unlink method from useUnlinkOAuth accepts an object with the following fields:
string
required
The OAuth provider to unlink. Use a built-in provider (e.g., 'google', 'twitter') or a custom provider in the format 'custom:<provider-name>' (e.g., 'custom:twitch').
string
required
The provider-specific subject identifier that uniquely identifies the user for the selected OAuth provider. This can be found in the linked account’s subject field.

Usage