Skip to content


getAuthDetails returns the details about the authenticated user, in accordance with the Magic web SDK's specifications.

This method must be called after authenticate. Otherwise, this method will throw an error with the message Not Authenticated.


import { createMagicSigner } from "./magic";

const magicSigner = await createMagicSigner();

const details = await magicSigner.getAuthDetails();
import { MagicSigner } from "@alchemy/aa-signers/magic";

// this is generated from the [Magic Dashboard](
const MAGIC_API_KEY = "pk_live_...";

export const createMagicSigner = async () => {
  const magicSigner = new MagicSigner({ apiKey: MAGIC_API_KEY });

  await magicSigner.authenticate({
    authenticate: async () => {
      await magicSigner.inner.wallet.connectWithUI();

  return magicSigner;



A Promise containing the MagicUserMetadata, and object with the following fields:

  • issuer: string | null -- the Decentralized ID of the user.
  • publicAddress: string | null -- the authenticated user's public address (EOA public key).
  • email: string | null -- email address of the authenticated user.
  • phoneNumber: string | null -- phone number of the authenticated user.
  • isMfaEnabled: boolean -- whether or not multi-factor authentication is enabled for the user.
  • recoveryFactors: RecoveryFactor[] -- any recovery methods that have been enabled (ex. [{ type: 'phone_number', value: '+99999999' }]).