lookupUserWithPasskey

Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper.

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.lookupUserWithPasskey();

Parameters

user

User An optional user object to authenticate

Returns

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