KeychainAccessibility
When a secret can be read (docs/secure-store.md).
Verwendung
Keep a token available to background work after the first unlock.
// Keep a token available to background work after the first unlock.
import { secureStore, type KeychainAccessibility } from 'kuito';
export async function saveSession(token: string) {
const accessibility: KeychainAccessibility = 'afterFirstUnlock';
await secureStore.set('session-token', token, { keychainAccessible: accessibility });
}
// The accessibility setting applies to the iOS Keychain.Typdeklaration
export type KeychainAccessibility = Accessibility;Typ
"whenUnlocked" | "afterFirstUnlock" | "whenUnlockedThisDeviceOnly" | "afterFirstUnlockThisDeviceOnly" | "whenPasscodeSetThisDeviceOnly"Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.