useManageMFA
Hook to manage Multi-Factor Authentication (MFA) using Embedded Wallets. This composable provides a convenient way to trigger MFA management actions, such as updating or configuring MFA settings for the user.
info
Please note that this composable doesn't work for external wallet logins. It only works for social login embedded wallets.
Import
import { useManageMFA } from '@web3auth/modal/vue'
Usage
<script setup lang="ts">
import { useManageMFA } from '@web3auth/modal/vue'
const { manageMFA, loading, error } = useManageMFA()
</script>
<template>
<button @click="manageMFA" :disabled="loading">
{{ loading ? "Managing MFA..." : "Manage MFA" }}
</button>
<div v-if="error">{{ error.message }}</div>
</template>
Return type
import type { IUseManageMFA } from '@web3auth/modal/vue'
loading
Ref<boolean>
Whether the MFA management process is in progress.
error
Ref<Web3AuthError | null>
Error that occurred during the MFA management process.
manageMFA
<T>(params?: T) => Promise<void>
Function to initiate the MFA management process. The signature accepts an optional params argument, but the composable currently doesn't forward it to web3Auth.manageMFA().