Skip to content

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

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

Parameters

config

{ bundle: string; orgId: string } The configuration object for the authentication function containing the credential bundle to inject and the organization id associated with the user

Returns

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