Represents the authentication state for a user session.

export interface AuthState {
isAuthenticated: boolean;
username?: string;
avatarUrl?: string;
userId?: number;
accessToken?: string;
expiresAt?: number;
credentialSource: "default" | "custom";
}
interface AuthState {
    isAuthenticated: boolean;
    username?: string;
    avatarUrl?: string;
    userId?: number;
    accessToken?: string;
    expiresAt?: number;
    credentialSource: "default" | "custom";
}

Properties

isAuthenticated: boolean

Whether the user is authenticated.

username?: string

The username of the authenticated user.

avatarUrl?: string

The URL of the user's avatar image.

userId?: number

The user's unique identifier.

accessToken?: string

The OAuth access token.

expiresAt?: number

The expiration timestamp for the access token.

credentialSource: "default" | "custom"

The source of the credentials (default or custom).