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

# useWeb3AuthUser

Composable to fetch and manage the current Web3Auth user information in Vue.

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/vue'

```

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

```
<script setup lang="ts">
  import { useWeb3AuthUser } from '@web3auth/modal/vue'

  const { userInfo, loading, error, isMFAEnabled, getUserInfo } = useWeb3AuthUser()
</script>

<template>
  <div v-if="loading">Loading user info...</div>
  <div v-else-if="error">Error: {{ error.message }}</div>
  <div v-else-if="!userInfo">No user info available.</div>
  <div v-else>
    <pre>{{ JSON.stringify(userInfo, null, 2) }}</pre>
    <div>MFA Enabled: {{ isMFAEnabled ? "Yes" : "No" }}</div>
    <button @click="getUserInfo">Refresh User Info</button>
  </div>
</template>

```

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

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

```

#### `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.
