Skip to content

getAuthDetails

getAuthDetails returns the details about the authenticated user, per the Arcana Auth SDK's getUser [UserInfo specifications](https://authsdk-ref-guide.netlify.app/interfaces/userinfo.

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

Usage

ts
import { createArcanaAuthSigner } from "./arcana-auth";

const newArcanaAuthSigner = await createArcanaAuthSigner();

const details = await newArcanaAuthSigner.getAuthDetails();
ts
import { ArcanaAuthSigner } from "@alchemy/aa-signers/arcana-auth";

// See https://docs.arcana.network/quick-start/vue-quick-start#step-3-integrate-app for details.
const clientId = "xar_test_...";

export const createArcanaAuthSigner = async () => {
  const arcanaAuthSigner = new ArcanaAuthSigner({ clientId, params: {} });

  await arcanaAuthSigner.authenticate({
    async init() {
      await arcanaAuthSigner.inner.init();
    },
    async connect() {
      await arcanaAuthSigner.inner.connect();
    },
  });

  return arcanaAuthSigner;
};

Returns

Promise<UserInfo>

A Promise containing the UserInfo, an object with the following fields:

  • address: string | null -- the EOA account address associated with the authenticated user's wallet.
  • email: string | null -- email address of the authenticated user.
  • id: string | null -- the decentralized user identifier.
  • loginToken: string -- JWT token returned after the user authenticates.
  • loginType: Logins | passwordless -- login provider type or passwordless used for authentication (ex. [{ Logins: "google" | "github" | "discord" | "twitch" | "twitter" | "aws" | "firebase" | "steam" }]).
  • name: string -- user name associated with the email id
  • picture: string -- url pointing to the user profile image
  • publicKey: string -- public key associated with the user account

See Arcana Auth SDK Reference Guide for details.