From f1c177b3cf644ebb4b45cae7b7950090a1601299 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:24:22 -0400 Subject: [PATCH] [PM-9980] Turn off cache for certain keys (#10226) * Turn Off Cache For DeviceKey * Turn Off Cache For AppId --- .../src/auth/services/device-trust.service.implementation.ts | 1 + libs/common/src/platform/services/app-id.service.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/libs/common/src/auth/services/device-trust.service.implementation.ts b/libs/common/src/auth/services/device-trust.service.implementation.ts index cc80ea888c..d02969c5d5 100644 --- a/libs/common/src/auth/services/device-trust.service.implementation.ts +++ b/libs/common/src/auth/services/device-trust.service.implementation.ts @@ -37,6 +37,7 @@ export const DEVICE_KEY = new UserKeyDefinition( deserializer: (deviceKey) => deviceKey ? (SymmetricCryptoKey.fromJSON(deviceKey) as DeviceKey) : null, clearOn: [], // Device key is needed to log back into device, so we can't clear it automatically during lock or logout + cleanupDelayMs: 0, }, ); diff --git a/libs/common/src/platform/services/app-id.service.ts b/libs/common/src/platform/services/app-id.service.ts index 56e9516bce..883a81a52d 100644 --- a/libs/common/src/platform/services/app-id.service.ts +++ b/libs/common/src/platform/services/app-id.service.ts @@ -6,6 +6,7 @@ import { APPLICATION_ID_DISK, GlobalStateProvider, KeyDefinition } from "../stat export const APP_ID_KEY = new KeyDefinition(APPLICATION_ID_DISK, "appId", { deserializer: (value: string) => value, + cleanupDelayMs: 0, }); export const ANONYMOUS_APP_ID_KEY = new KeyDefinition(APPLICATION_ID_DISK, "anonymousAppId", { deserializer: (value: string) => value,