> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# Hooks

React hooks for authentication, wallet management, and user state in React Native applications. Every hook is exported from `@openfort/react-native` and reads the context created by `OpenfortProvider`, so calling one outside the provider throws `useOpenfortContext must be used within a OpenfortProvider`.

## Core

| Hook | Description |
|------|-------------|
| [`useOpenfort`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useOpenfort) | SDK initialization state: `isReady` and `error` |
| [`useOpenfortClient`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useOpenfortClient) | Direct access to the Openfort client |
| [`useUser`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useUser) | Current user and access token |

## Authentication

Each of these hooks drives one sign-in method. They share the state and callback conventions described below.

| Hook | Description |
|------|-------------|
| [`useEmailAuth`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useEmailAuth) | Email/password authentication |
| [`useEmailAuthOtp`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useEmailAuthOtp) | Email OTP authentication |
| [`usePhoneAuthOtp`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/usePhoneAuthOtp) | Phone OTP authentication |
| [`useOAuth`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useOAuth) | OAuth provider authentication |
| [`useGuestAuth`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useGuestAuth) | Guest authentication |
| [`useWalletAuth`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useWalletAuth) | SIWE wallet authentication |
| [`useSignOut`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useSignOut) | Sign out and clear session |

## Wallets

| Hook | Description |
|------|-------------|
| [`useEmbeddedEthereumWallet`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useEmbeddedEthereumWallet) | Embedded Ethereum wallet management |
| [`useEmbeddedSolanaWallet`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/useEmbeddedSolanaWallet) | Embedded Solana wallet management |

Both wallet hooks report progress through a `status` field (`disconnected`, `creating`, `needs-recovery`, `connected`, and so on) rather than the `isLoading` flags used by the authentication hooks.

## Funding

| Hook | Description |
|------|-------------|
| [`useFunding`](https://www.openfort.io/docs/products/embedded-wallet/react-native/wallet/funding) | Cross-chain deposit session, deposit address, and settlement status |
| `useFundingChains` | Source chains and currencies the deposit rail can route from, for building a source picker |

## Utils

| Hook | Description |
|------|-------------|
| [`usePasskeyPrfSupport`](https://www.openfort.io/docs/products/embedded-wallet/react-native/hooks/usePasskeyPrfSupport) | Check device passkey PRF support (Android 14+, iOS 18+) |

## Shared conventions

The authentication hooks accept `onSuccess`, `onError`, and `throwOnError` when you call the hook, and accept the same options again on each action so you can handle one call differently. Both sets of callbacks run, hook-level first.

They return `isLoading`, `isError`, `isSuccess`, and `error` alongside their actions. Actions resolve to a result object carrying an optional `error` instead of throwing, unless `throwOnError` is set at either level. `onError` receives an `OpenfortError`, which exposes a machine-readable `error` code next to the human-readable `error_description`.

## Related

* [Components](https://www.openfort.io/docs/products/embedded-wallet/react-native/components) — `OpenfortProvider` and `AuthBoundary`
* [Quickstart](https://www.openfort.io/docs/products/embedded-wallet/react-native) — Install the SDK and mount the provider
* [Authentication methods](https://www.openfort.io/docs/products/embedded-wallet/authentication) — Choosing between the sign-in methods above
