π react-native-sensitive-info v6.1.4
π iOS Biometric Prompt Fix
This release fixes duplicate Face ID / Touch ID prompts on iOS when working with biometric-protected Keychain entries.
β¨ What Changed
- π§ Prompted value reads now own an
LAContextfrom the firstSecItemCopyMatchingcall. - π€«
hasItemnow uses a dedicated silent existence path on iOS. - π Metadata-only reads and listings avoid triggering biometric UI.
- π§© JS option normalization is now operation-aware, so silent probes do not accidentally forward biometric prompt fields.
- πͺ Hooks now avoid leaking prompt-bearing options into silent fetch/existence checks.
β Fixed Scenarios
- Calling
hasItem()beforegetItem()no longer causes two Face ID prompts. useHasSecret()remains silent even when callers reuse biometric option bags.useSecureStorage()metadata listings stay prompt-free unless values are explicitly requested.getItem(..., { includeValue: false })avoids biometric prompts for metadata-only reads.- Prompted
getItem()reads avoid retry-driven duplicate Face ID / Touch ID sheets.
π Why This Matters
On iOS, even Keychain existence or attribute queries can require user presence for biometric-protected items. Previously, an app flow like:
await hasItem('session-token', { service: 'auth' })
await getItem('session-token', {
service: 'auth',
authenticationPrompt: { title: 'Unlock session' },
})could show Face ID twice: once during the existence check and once during the actual unlock.
Now, silent probes stay silent, and authentication is reserved for the operation that actually opens the protected value.
π± Recommended iOS Validation
For apps using biometric-protected secrets, validate on a real iOS device:
- Store an item with biometric access control.
- Call
hasItem()during initialization. - Call
getItem()when the user explicitly unlocks. - Confirm there is no Face ID prompt during initialization and exactly one prompt during unlock.
π Upgrade Notes
No public API changes are required. Existing apps should benefit automatically, especially flows that perform existence checks before reading a protected value.