KeychainAccessibility
When a secret can be read (docs/secure-store.md).
Utilização
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.Declaração do tipo
export type KeychainAccessibility = Accessibility;Tipo
"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.