React Native hooks for Embedded Wallets
The Embedded Wallets React Native SDK exposes its features through React hooks. Use all hooks
inside the Web3AuthProvider component tree.
Core hooks
| Hook | Description |
|---|---|
useWeb3Auth | SDK state (isConnected, isInitializing, initError), the wallet connection, and web3Auth. |
Authentication hooks
| Hook | Description |
|---|---|
useWeb3AuthConnect | Sign a user in with connectTo. |
useWeb3AuthDisconnect | Sign the user out. |
useRefreshSession | Revalidate the session and reload session data. |
Identity hooks
| Hook | Description |
|---|---|
useWeb3AuthUser | The signed-in user's profile and MFA status. |
useAuthTokenInfo | Identity token (JWT) for server-side verification. |
useAccessToken | Embedded Wallets access token for the current session. |
useIdentityToken | Deprecated. Use useAuthTokenInfo instead. |
Multi-factor authentication hooks
| Hook | Description |
|---|---|
useEnableMFA | Start MFA setup for the signed-in user. |
useManageMFA | Manage MFA factors for a user with MFA enabled. |
Wallet Services hooks
| Hook | Description |
|---|---|
useWalletUI | Open the Wallet Services UI. |
useSignatureRequest | Request a signature with a confirmation screen in Wallet Services. |
Chain-specific hooks
- Ethereum hooks (Wagmi) from
@web3auth/react-native-sdk/wagmi - Solana hooks from
@web3auth/react-native-sdk/solana:useSolanaWallet,useSignMessage,useSignTransaction, anduseSignAndSendTransaction