Files
CPLv4.0/utils/checkSession.ts

15 lines
407 B
TypeScript

// utils/checkSession.ts
export async function checkSession(): Promise<boolean> {
try {
// Beispiel: prüfe ob ein erwartetes globales Fenster-Objekt noch existiert
const expectedGlobalVar = "win_kueID"; // oder "win_deviceName", je nach System
if (typeof window === "undefined") return false;
return window[expectedGlobalVar] !== undefined;
} catch (error) {
return false;
}
}