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

# useEnableMFA

Hook to enable Multi-Factor Authentication (MFA) for the current user's embedded wallet.

info

This hook only works for social login embedded wallets. It is not available for external wallet connections.

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

```
import { useEnableMFA } from '@web3auth/react-native-sdk'

```

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

```
import { useEnableMFA } from '@web3auth/react-native-sdk'

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

  return (
    <View>
      <Button
        title={loading ? 'Setting up MFA…' : 'Enable MFA'}
        disabled={loading}
        onPress={() => enableMFA()}
      />
      {error && <Text>{error.message}</Text>}
    </View>
  )
}

```

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

#### `enableMFA`[​](#enablemfa "Direct link to enablemfa")

`() => Promise<void>`

Opens the MFA setup flow in the Wallet Services overlay. The user is guided through registering a second factor (device, recovery key, or authenticator app). Once set up, the user's wallet key is split across multiple shares.

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

`boolean`

`true` while the MFA setup process is in progress.

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

`Web3AuthError | null`

Error from the most recent `enableMFA` call, or `null` if successful.

### Related[​](#related "Direct link to Related")

- [MFA advanced guide](/embedded-wallets/sdk/react-native/advanced/mfa/)
- [useManageMFA](/embedded-wallets/sdk/react-native/hooks/useManageMFA/)
