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

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

const newArcanaAuthSigner = await createArcanaAuthSigner();
 
const details = await newArcanaAuthSigner.getAuthDetails();

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.