submitOtpCode

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

Import

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

Usage

1import { AlchemySignerWebClient } from "@account-kit/signer";
2
3const client = new AlchemySignerWebClient({
4 connection: {
5 apiKey: "your-api-key",
6 },
7 iframeConfig: {
8 iframeContainerId: "signer-iframe-container",
9 },
10});
11
12const account = await client.submitOtpCode({
13 orgId: "user-org-id",
14 otpId: "opt-returned-from-initEmailAuth",
15 otpCode: "otp-code-from-email",
16});

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.