Verwendung

Keep a token available to background work after the first unlock.

tsx
// 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

ts
export type KeychainAccessibility = Accessibility;

Typ

ts
"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.