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

# useEnableMFA

Composable to enable Multi-Factor Authentication (MFA) using Embedded Wallets in Vue.

info

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

### Import

```ts
import { useEnableMFA } from '@web3auth/modal/vue'

```

### Usage

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

  const { enableMFA, loading, error } = useEnableMFA()
</script>

<template>
  <button @click="enableMFA" :disabled="loading">
    {{ loading ? "Enabling MFA..." : "Enable MFA" }}
  </button>
  <div v-if="error">{{ error.message }}</div>
</template>

```

### Return type

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

```

#### `loading`

`Ref<boolean>`

Whether the MFA enabling process is in progress.

#### `error`

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