Utilização

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.

Declaração do tipo

ts
export type KeychainAccessibility = Accessibility;

Tipo

ts
"whenUnlocked" | "afterFirstUnlock" | "whenUnlockedThisDeviceOnly" | "afterFirstUnlockThisDeviceOnly" | "whenPasscodeSetThisDeviceOnly"
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.