Skip to content

authenticate

Authenticate a user with either an email or a passkey and create a session for that user

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.authenticate({
  type: "email",
  email: "[email protected]",
});

Parameters

params

AuthParams

  • undefined if passkey login, otherwise an object with email and bundle to resolve

    Returns

    Promise<User> the user that was authenticated