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

# useManageMFA

Hook to manage Multi-Factor Authentication (MFA) using Embedded Wallets. This hook provides a convenient way to trigger MFA management actions, such as updating or configuring MFA settings for the user.

info

Please note that this hook doesn't work for external wallet logins. It only works for social login embedded wallets.

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

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

```

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

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

function ManageMFAButton() {
  const { manageMFA, loading, error } = useManageMFA()

  return (
    <div>
      <button onClick={() => manageMFA()} disabled={loading}>
        {loading ? 'Managing MFA...' : 'Manage MFA'}
      </button>
      {error && <div>{error.message}</div>}
    </div>
  )
}

```

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

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

```

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

`boolean`

Whether the MFA management process is in progress.

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

`Web3AuthError | null`

Error that occurred during the MFA management process.

#### `manageMFA`[​](#managemfa "Direct link to managemfa")

`<T>(params?: T) => Promise<void>`

Function to initiate the MFA management process. Accepts optional parameters depending on the MFA action or configuration required by your implementation.
