Skip to main content

React Hooks for Web3Auth Modal

Web3Auth offers a comprehensive suite of React hooks to streamline integration and state management within your React applications. These hooks abstract away common authentication and wallet operations, enabling you to implement Web3Auth features with minimal boilerplate. Each hook is focused on a specific aspect of Web3Auth functionality, making it easy to implement authentication, wallet operations, and blockchain interactions in your React projects.

List of React Hooks

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each hook.

Web3Auth Hooks

Hook NameDescription
useWeb3AuthCore hook for Web3Auth initialization and state management.

Authentication Hooks

Hook NameDescription
useWeb3AuthConnectHandles Web3Auth connection processes.
useWeb3AuthDisconnectManages disconnection from Web3Auth.

Identity Hooks

Hook NameDescription
useIdentityTokenRetrieves and manages identity tokens.
useWeb3AuthUserProvides access to the authenticated user's information.

Blockchain Hooks

Hook NameDescription
useSwitchChainAllows switching between different blockchain networks.

MFA Hooks

Hook NameDescription
useEnableMFAEnables Multi-Factor Authentication (MFA) for enhanced security.
useManageMFAProvides functionality to manage MFA settings.

Wallet Services Plugin Hooks

Hook NameDescription
useWalletConnectScannerIntegrates WalletConnect scanner functionality.
useWalletUIManages wallet UI components and user interactions.
useCheckoutFacilitates cryptocurrency checkout processes.
useSwapEnables token swapping capabilities.
useWalletServicesPluginProvides access to wallet service plugins.