# useEnableMFA

> @web3auth/modal React Hooks useEnableMFA | Embedded Wallets

Hook to enable Multi-Factor Authentication (MFA) using Web3Auth.

:::info

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

:::

### Import

```tsx

```

### Usage

```tsx

function EnableMFAButton() {
  const { enableMFA, loading, error } = useEnableMFA()

  return (
    
      <button onClick={() => enableMFA()} disabled={loading}>
        {loading ? 'Enabling MFA...' : 'Enable MFA'}
      </button>
      {error && {error.message}}
    
  )
}
```

### Return type

```tsx

```

#### `loading`

`boolean`

Whether the MFA enabling process is in progress.

#### `error`

`Web3AuthError | null`

Error that occurred during the MFA enabling process.

#### `enableMFA`

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

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