Skip to content

feat(biometric): add macOS Touch ID support via LocalAuthentication framework#3264

Open
takahashim wants to merge 1 commit intotauri-apps:v2from
takahashim:feat/mac-biometric
Open

feat(biometric): add macOS Touch ID support via LocalAuthentication framework#3264
takahashim wants to merge 1 commit intotauri-apps:v2from
takahashim:feat/mac-biometric

Conversation

@takahashim
Copy link

Add macOS Touch ID support to the biometric plugin via the LocalAuthentication framework using objc2 bindings.
Non-macOS desktop platforms should compile successfully and return "not available" gracefully.

Related issue: #1880

Implementation Details

  • macOS implementation uses objc2-local-authentication crate.
    It includes status() (Touch ID availability check) and authenticate() (Touch ID prompt with device credential fallback).
  • mobile.rs is extracted from the original mobile-only lib.rs.
    The core logic (plugin registration, run_mobile_plugin calls) is preserved, but JS invocations now route through commands.rs instead of being forwarded directly to the native plugin. This required adding max_attemps to the Rust AuthOptions struct so the value passes through the Rust layer to Android/iOS.
  • Behavior in macOS is aligned with the existing iOS plugin: pre-check via canEvaluatePolicy, localized fallback/cancel titles, touchIDAuthenticationAllowableReuseDuration = 0, and LAError code mapping.

@takahashim takahashim requested a review from a team as a code owner February 7, 2026 16:38
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​objc2-local-authentication@​0.3.010010093100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants