Skip to content

fix(android): support face unlock and device credentials (fixes #45) - #100

Merged
riderx merged 2 commits into
mainfrom
fix/issue-45-android-biometric-types
Jul 4, 2026
Merged

fix(android): support face unlock and device credentials (fixes #45)#100
riderx merged 2 commits into
mainfrom
fix/issue-45-android-biometric-types

Conversation

@riderx

@riderx riderx commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Default Android BiometricPrompt to strong and weak biometric classes so face unlock works on devices that classify it as weak biometrics (fixes Only supports fingerprint authentication on Android #45).
  • Map allowedBiometryTypes to the correct prompt/Keystore authenticators (fingerprint-only stays strong-class; face/iris/multiple allow weak+strong; DEVICE_CREDENTIAL enables PIN/pattern/password without a cancel button).
  • Report weak-only biometrics as available in isAvailable() to match the updated verifyIdentity() behavior.

Test plan

  • bun run verify (iOS, Android unit tests, web build)
  • Manual: device with face-only unlock → verifyIdentity() shows face prompt
  • Manual: device with fingerprint + face → allowedBiometryTypes: [FINGERPRINT] shows fingerprint-only prompt
  • Manual: allowedBiometryTypes: [DEVICE_CREDENTIAL] shows PIN/pattern/password prompt

Made with Cursor

…tricPrompt

Expand Android verifyIdentity() beyond BIOMETRIC_STRONG-only so face unlock
and other weak-class biometrics work by default, honor allowedBiometryTypes
filters, and support DEVICE_CREDENTIAL when explicitly requested.

Fixes #45

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f47ac473-52bc-4069-ba76-d22e381aedaf

📥 Commits

Reviewing files that changed from the base of the PR and between cb257c8 and c700b30.

📒 Files selected for processing (6)
  • README.md
  • android/src/main/java/ee/forgr/biometric/AuthActivity.java
  • android/src/main/java/ee/forgr/biometric/BiometricAuthenticatorConfig.java
  • android/src/main/java/ee/forgr/biometric/NativeBiometric.java
  • android/src/test/java/ee/forgr/biometric/BiometricAuthenticatorConfigTest.java
  • src/definitions.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Beta npm build

Maintainers can publish this PR to npm for fast testing.

Comment /publish-beta after the PR checks are green.

The workflow will:

  • publish a prerelease package on the beta tag
  • add a pinned pr-100 dist-tag for this exact PR build
  • update this comment with the install command

Security note: beta publish is only enabled for branches inside this repository.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx marked this pull request as ready for review July 3, 2026 12:52
@riderx
riderx merged commit 22e4a4c into main Jul 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only supports fingerprint authentication on Android

1 participant