Skip to content

Commit c5ff15b

Browse files
committed
docs(definitions): clarify IsAvailableOptions.useFallback Android semantics
Distinguish availability vs authentication: on Android, useFallback is honored by isAvailable() (fallbackAvailable = useFallback && deviceIsSecure) but ignored by verifyIdentity() due to BiometricPrompt API constraints. Addresses CodeRabbit review comment on PR epicshaggy#91.
1 parent 2db47cf commit c5ff15b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/definitions.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,16 @@ export interface Credentials {
6363

6464
export interface IsAvailableOptions {
6565
/**
66-
* Specifies if passcode or device credentials should be considered when biometric authentication is not available.
67-
* On Android, this can make `isAvailable()` return true when the device has a secure lock screen.
68-
* The `verifyIdentity()` flow still ignores this option on Android due to BiometricPrompt API constraints:
69-
* DEVICE_CREDENTIAL authenticator and negative button (cancel) are mutually exclusive.
66+
* Whether passcode or device credentials should count toward biometric availability
67+
* when no biometric is enrolled or available.
68+
*
69+
* - On iOS, this affects both `isAvailable()` and `verifyIdentity()`.
70+
* - On Android, this is honored by `isAvailable()` only — the native check computes
71+
* `fallbackAvailable = useFallback && deviceIsSecure` and reports availability
72+
* accordingly. The `verifyIdentity()` flow ignores this option on Android due to
73+
* BiometricPrompt API constraints (DEVICE_CREDENTIAL authenticator and negative
74+
* button are mutually exclusive); use `BiometricOptions.useFallback` (iOS-only) to
75+
* control the auth-dialog fallback there.
7076
*/
7177
useFallback: boolean;
7278
}

0 commit comments

Comments
 (0)