Download mobile/modules/engine/src/utils/cloudClient/cloudSecureStore.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/cloudClient/cloudSecureStore.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/modules/engine/src/utils/cloudClient/cloudSecureStore.ts
-
curl -L -o cloudSecureStore.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/cloudClient/cloudSecureStore.ts
773 Bytes
| /** | |
| * The `KeyValueStore` @mentra/cloud-client persists its Cloud V2 refresh tokens in (one per deployment), so a | |
| * relaunch does not force a new login. The engine owns it. | |
| * | |
| * The tokens live in the platform secure store (Keychain / Keystore-backed). Earlier builds kept them in the | |
| * dedicated `mentra-cloud-v2` MMKV instance, which held nothing else; the vault moves them out once. | |
| */ | |
| import {createPlatformCredentialVault, mmkvLegacyCredentials} from "../credentials/platform" | |
| /** The MMKV instance earlier builds kept the refresh tokens in. */ | |
| const LEGACY_MMKV_ID = "mentra-cloud-v2" | |
| export const cloudSecureStore = createPlatformCredentialVault( | |
| "cloud", | |
| mmkvLegacyCredentials({id: LEGACY_MMKV_ID, keys: "every key", encoding: "raw"}), | |
| ) | |