Skip to content

Feat/macos biometric - #4

Open
denjell-crabnebula wants to merge 2 commits into
v2from
feat/macos-biometric
Open

denjell-crabnebula wants to merge 2 commits into
v2from
feat/macos-biometric

Conversation

@denjell-crabnebula

Copy link
Copy Markdown

lets see if this works

denjell-crabnebula and others added 2 commits August 28, 2026 21:52
The plugin was mobile-only. macOS has no native Tauri plugin to proxy to,
so LocalAuthentication is driven in-process and the same two commands are
served over the desktop invoke handler — a frontend written against the
iOS/Android API works unchanged.

- status() pre-flights the policy, so it never presents UI and is safe to
  call on launch; it reports the biometry type even when unavailable, since
  "Touch ID present but not enrolled" and "no Touch ID" are different
  messages.
- authenticate() maps allow_device_credential to DeviceOwnerAuthentication
  (the login password) and honours the cancel/fallback titles. The prompt is
  answered on an arbitrary queue, so the reply is funnelled through a channel
  and the context is held until it arrives — dropping it cancels the prompt.
- LAError codes are mapped to the string identifiers the JS API documents.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The JS API sends `{ reason, ...options }` — the options are flattened into
the payload rather than nested under an `options` key — so a command taking
`options: AuthOptions` was rejected with "missing required key options".

Take the fields individually and reassemble them. Matching the existing wire
format is the point of the port: it is what lets one frontend target mobile
and macOS without branching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant