secureStore.set
Stores value under key, replacing the secret and its options.
Utilisation
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.Signatures
(key: string, value: string, options?: SecureStoreOptions): Promise<void>Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
key | string | Oui | — |
value | string | Oui | — |
options | SecureStoreOptions | Non | — Par défaut: {} |
Retourne
Promise<void>
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.