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.

Signaturen

ts
(key: string, value: string, options?: SecureStoreOptions): Promise<void>

Parameter

NameTypErforderlichBeschreibung
keystringJa—
valuestringJa—
optionsSecureStoreOptionsNein—
Standard: {}

Rückgabe

Promise<void>

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.