Skip to content

submitOtpCode

Authenticates using an OTP code which was previously received via email.

Import

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

Usage

import { AlchemySignerWebClient } from "@account-kit/signer";
 
const client = new AlchemySignerWebClient({
  connection: {
    apiKey: "your-api-key",
  },
  iframeConfig: {
    iframeContainerId: "signer-iframe-container",
  },
});
 
const account = await client.submitOtpCode({
  orgId: "user-org-id",
  otpId: "opt-returned-from-initEmailAuth",
  otpCode: "otp-code-from-email",
});

Parameters

args

Omit<OtpParams, "targetPublicKey"> The parameters for the OTP request, excluding the target public key.

Returns

Promise<{ bundle: string }> A promise that resolves to an object containing the credential bundle.