> For the complete documentation index, see [llms.txt](/llms.txt).

# useWeb3AuthUser

Hook to fetch and manage the current Embedded Wallets user information.

In Web SDK v11, `userInfo` can include a `linkedAccounts` array when the user has linked external wallets. See [User details](/embedded-wallets/dashboard/advanced/user-details/#richer-user-object-web-sdk-v11) and [Multi-wallet linking](/embedded-wallets/features/multi-wallet-linking/).

info

For external-wallet-only logins, profile fields may be limited compared to social or passwordless logins. Use `linkedAccounts` to see every wallet linked to the same user.

### Import[​](#import "Direct link to Import")

```
import { useWeb3AuthUser } from '@web3auth/modal/react'

```

### Usage[​](#usage "Direct link to Usage")

```
import { useWeb3AuthUser } from '@web3auth/modal/react'

function UserInfo() {
  const { userInfo, loading, error, isMFAEnabled, getUserInfo } = useWeb3AuthUser()

  if (loading) return <div>Loading user info...</div>
  if (error) return <div>Error: {error.message}</div>
  if (!userInfo) return <div>No user info available.</div>

  return (
    <>
      <div>
        <pre>{JSON.stringify(userInfo, null, 2)}</pre>
        <div>MFA Enabled: {isMFAEnabled ? 'Yes' : 'No'}</div>
        <button onClick={() => getUserInfo()}>Refresh User Info</button>
      </div>
      {error && <div>{error.message}</div>}
    </>
  )
}

```

### Return type[​](#return-type "Direct link to Return type")

```
import { type IUseWeb3AuthUser } from '@web3auth/modal/react'

```

#### `loading`[​](#loading "Direct link to loading")

`boolean`

Whether the user info fetching process is in progress.

#### `error`[​](#error "Direct link to error")

`Web3AuthError | null`

Error that occurred during the user info fetching process.

#### `userInfo`[​](#userinfo "Direct link to userinfo")

`Partial<UserInfo> | null`

The current user's information, or null if not available. May include `linkedAccounts` (array of linked wallet addresses and connectors) in Web SDK v11.

#### `isMFAEnabled`[​](#ismfaenabled "Direct link to ismfaenabled")

`boolean`

Whether Multi-Factor Authentication (MFA) is enabled for the user.

#### `getUserInfo`[​](#getuserinfo "Direct link to getuserinfo")

`() => Promise<Partial<UserInfo> | null>`

Function to fetch the latest user information from Web3Auth.
