Skip to content

@loontail/minecraft-kit / OnlineAuth

Type Alias: OnlineAuth

ts
type OnlineAuth = {
  accessToken: string;
  clientId?: AzureClientId;
  mode: typeof ONLINE;
  username: string;
  userType: string;
  uuid: PlayerUuid;
  xuid?: string;
};

Defined in: src/types/auth.ts:62

Online (token-based) authentication.

Build via toOnlineAuth from a MojangSession; rarely constructed directly.

clientId and xuid are Microsoft-specific and optional: a launcher whose accounts come from its own auth service (Yggdrasil and friends) has no Azure application id and no XUID. Omit them rather than inventing a value — the launch placeholders resolve an absent field to the empty string, which is exactly what the offline path already passes.

Properties

PropertyModifierTypeDefined in
accessTokenreadonlystringsrc/types/auth.ts:66
clientId?readonlyAzureClientIdsrc/types/auth.ts:68
modereadonlytypeof ONLINEsrc/types/auth.ts:63
usernamereadonlystringsrc/types/auth.ts:64
userTypereadonlystringsrc/types/auth.ts:67
uuidreadonlyPlayerUuidsrc/types/auth.ts:65
xuid?readonlystringsrc/types/auth.ts:69

MIT License