Appearance
@loontail/minecraft-kit / MojangSession
Type Alias: MojangSession
ts
type MojangSession = {
microsoft: {
clientId: AzureClientId;
refreshToken: MicrosoftRefreshToken;
};
minecraft: {
accessToken: string;
expiresAt: number;
skins: ReadonlyArray<MojangProfileSkin>;
username: string;
uuid: PlayerUuid;
xuid: string;
};
};Defined in: src/types/auth.ts:128
Combined Microsoft + Minecraft session returned by kit.auth.authorizationCode.run and kit.auth.refresh.
The fields under minecraft are everything OnlineAuth needs plus the raw /minecraft/profile payload so callers do not have to re-fetch it for skin/cape UI. The fields under microsoft are needed only to refresh the session later — persist them to durable storage (encrypted) alongside the user's profile.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
microsoft | readonly | { clientId: AzureClientId; refreshToken: MicrosoftRefreshToken; } | - | src/types/auth.ts:143 |
microsoft.clientId | readonly | AzureClientId | Azure AD application id used to mint the session. | src/types/auth.ts:147 |
microsoft.refreshToken | readonly | MicrosoftRefreshToken | Microsoft refresh token; used to obtain a fresh session without re-prompting. | src/types/auth.ts:145 |
minecraft | readonly | { accessToken: string; expiresAt: number; skins: ReadonlyArray<MojangProfileSkin>; username: string; uuid: PlayerUuid; xuid: string; } | - | src/types/auth.ts:129 |
minecraft.accessToken | readonly | string | Bearer token for api.minecraftservices.com and the game itself. | src/types/auth.ts:135 |
minecraft.expiresAt | readonly | number | Wall-clock ms timestamp when accessToken expires. | src/types/auth.ts:137 |
minecraft.skins | readonly | ReadonlyArray<MojangProfileSkin> | Every skin slot Mojang has issued for the user (active + inactive). | src/types/auth.ts:141 |
minecraft.username | readonly | string | Player display name. | src/types/auth.ts:131 |
minecraft.uuid | readonly | PlayerUuid | Player UUID, dashed (e.g. f81d4fae-7dec-11d0-a765-00a0c91e6bf6). | src/types/auth.ts:133 |
minecraft.xuid | readonly | string | Xbox User ID (XUID) as a numeric string. | src/types/auth.ts:139 |