Alchemy Logo

useMFA

function useMFA(): UseMFAResult;

Defined in: account-kit/react/src/hooks/useMFA.ts:53

Hook that provides functions and state for managing multi-factor authentication (MFA) operations. Handles adding, verifying, removing, and getting MFA factors for an authenticated account.

The hook checks if the signer is connected before allowing MFA operations and provides an isReady flag to indicate whether MFA operations can be performed.

import { useMFA } from "@account-kit/react";
 
const { addMFA, verifyMFA, removeMFA, getMFAFactors, isReady } = useMFA();

UseMFAResult

An object containing functions and state for handling MFA operations

Was this page helpful?