- React
- React Native
- Android
- Swift
Privy supports whitelabeling user management for linking and unlinking accounts.
Linking a social account
Linking a social account
Linking a wallet
Linking a wallet
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.- Ethereum (SIWE)
- Solana (SIWS)
To link an Ethereum wallet to a user via SIWE, use the React SDK’s Alternatively, you can request a signature from any external wallet or smart account:
useLinkWithSiwe hook.Generate SIWE message
Sign the SIWE message
Request an EIP-191personal_sign signature for the message returned by generateSiweMessage from the wallet.Link with SIWE
Usage
Callbacks
You can optionally pass callbacks intouseLinkWithSiwe:Updating an email
Updating an email
To whitelabel updating a user’s email address, use the This sends a one-time passcode to the new email address, which the user must enter to verify and confirm the update.
useUpdateEmail hook:Send an OTP
First, use thesendCode method to send an OTP verification code to the user’s new email address:Verify the OTP
Prompt the user for the OTP they received and verify it using theverifyCode method:State
Thestate property provides the current state of the OTP flow:| Status | Description |
|---|---|
'initial' | The flow has not started |
'sending-code' | The code is being sent |
'awaiting-code-input' | Waiting for the user to enter the code |
'submitting-code' | The code is being verified |
'done' | The email was updated successfully |
'error' | An error occurred (includes an error field) |
Usage
Callbacks
You can optionally pass callbacks intouseUpdateEmail:Unlinking an account
Unlinking an account
To whitelabel unlinking an account, use the
usePrivy hook and call unlink<Provider>.
