secureStore.set
Stores value under key, replacing the secret and its options.
Usage
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>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | — |
value | string | Yes | — |
options | SecureStoreOptions | No | — Default: {} |
Returns
Promise<void>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.