completeAuthWithBundle

Completes auth for the user by injecting a credential bundle and retrieving the user information based on the provided organization ID. Emits events during the process.

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.completeAuthWithBundle({
13 orgId: "user-org-id",
14 bundle: "bundle-from-email",
15 connectedEventName: "connectedEmail",
16});

Parameters

config

{ bundle: string; orgId: string, connectedEventName: keyof AlchemySignerClientEvents, idToken?: string } The configuration object for the authentication function containing the credential bundle to inject and the organization id associated with the user, as well as the event to be emitted on success and optionally an OIDC ID token with extra user information

Returns

Promise<User> A promise that resolves to the authenticated user information