For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

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​

HookDescription
useWeb3AuthSDK state (isConnected, isInitializing, initError), the wallet connection, and web3Auth.

Authentication hooks​

HookDescription
useWeb3AuthConnectSign a user in with connectTo.
useWeb3AuthDisconnectSign the user out.
useRefreshSessionRevalidate the session and reload session data.

Identity hooks​

HookDescription
useWeb3AuthUserThe signed-in user's profile and MFA status.
useAuthTokenInfoIdentity token (JWT) for server-side verification.
useAccessTokenEmbedded Wallets access token for the current session.
useIdentityTokenDeprecated. Use useAuthTokenInfo instead.

Multi-factor authentication hooks​

HookDescription
useEnableMFAStart MFA setup for the signed-in user.
useManageMFAManage MFA factors for a user with MFA enabled.

Wallet Services hooks​

HookDescription
useWalletUIOpen the Wallet Services UI.
useSignatureRequestRequest 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, and useSignAndSendTransaction