import {
clearDeviceAuthTokenFromStore,
type DeviceAuthEntry,
loadDeviceAuthTokenFromStore,
storeDeviceAuthTokenInStore,
} from "../../../src/shared/device-auth-store.js"; import type { DeviceAuthStore } from "../../../src/shared/device-auth.js"; import { getSafeLocalStorage } from "../local-storage.ts";
const STORAGE_KEY = "openclaw.device.auth.v1";
function readStore(): DeviceAuthStore | null { try { const raw = getSafeLocalStorage()?.getItem(STORAGE_KEY); if (!raw) { returnnull;
} const parsed = JSON.parse(raw) as DeviceAuthStore; if (!parsed || parsed.version !== 1) { returnnull;
} if (!parsed.deviceId || typeof parsed.deviceId !== "string") { returnnull;
} if (!parsed.tokens || typeof parsed.tokens !== "object") { returnnull;
} return parsed;
} catch { returnnull;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.