Skip to content

addPasskey

Adds a passkey to the user's account

Import

import { BaseAlchemySigner } from "@account-kit/signer";

Usage

import { AlchemyWebSigner } from "@account-kit/signer";
 
const signer = new AlchemyWebSigner({
  client: {
    connection: {
      rpcUrl: "/api/rpc",
    },
    iframeConfig: {
      iframeContainerId: "alchemy-signer-iframe-container",
    },
  },
});
 
const result = await signer.addPasskey();

Parameters

params

CredentialCreationOptions | undefined optional parameters for the passkey creation

Returns

Promise<string[]> an array of the authenticator ids added to the user