getMfaStatus

Gets the current MFA status

Import

1import { BaseAlchemySigner } from "@account-kit/signer";

Usage

1import { AlchemyWebSigner } from "@account-kit/signer";
2
3const signer = new AlchemyWebSigner({
4 client: {
5 connection: {
6 rpcUrl: "/api/rpc",
7 },
8 iframeConfig: {
9 iframeContainerId: "alchemy-signer-iframe-container",
10 },
11 },
12});
13
14const mfaStatus = signer.getMfaStatus();
15if (mfaStatus === AlchemyMfaStatus.REQUIRED) {
16 // Handle MFA requirement
17}

Returns

{ mfaRequired: boolean; mfaFactorId?: string } The current MFA status