Skip to content

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

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

Parameters

user

User An optional user object to authenticate

Returns

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