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, 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