Skip to content

verifyMfa

Verifies a newly created MFA factor to complete the setup process.

Import

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

Usage

import { AlchemyWebSigner } from "@account-kit/signer";
 
const signer = new AlchemyWebSigner({
  client: {
    connection: {
      rpcUrl: "/api/rpc",
    },
    iframeConfig: {
      iframeContainerId: "alchemy-signer-iframe-container",
    },
  },
});
 
const result = await signer.verifyMfa({
  multiFactorId: "factor-id",
  multiFactorCode: "123456", // 6-digit code from authenticator app
});

Parameters

params

VerifyMfaParams The parameters required to verify the MFA factor

Returns

Promise<{ multiFactors: MfaFactor[] }> A promise that resolves to the updated list of MFA factors