Skip to content

refactor(biometric): gate the vault read through localauthentication.Gate - #277

Merged
tannevaled merged 1 commit into
mainfrom
feat/biometric-use-gate
Aug 31, 2026
Merged

refactor(biometric): gate the vault read through localauthentication.Gate#277
tannevaled merged 1 commit into
mainfrom
feat/biometric-use-gate

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The macOS authenticate path in internal/biometric was Available + Evaluate composed by hand — precisely the convenience contract that go-macos/localauthentication now ships as Gate (released as v0.1.0):

  • prompts when the owner check (Touch ID, or the device password) is evaluable,
  • returns nil without prompting when it is not — so a person with no biometric or passcode is never locked out of their own vault,
  • errors only when an available check is failed or cancelled.

This delegates to la.Gate, removing the duplicated policy logic, and bumps the dependency from a pre-Gate pseudo-version to the released v0.1.0 tag.

No behaviour change: the previous hand-rolled logic and Gate are byte-identical in intent. Coverage is unaffected — the Linux coverage gate exercises biometric_other.go (100%); the darwin path is a cross-compile build check, which passes.

🤖 Generated with Claude Code

…Gate

The darwin authenticate path was Available+Evaluate composed by hand — exactly
the convenience contract the library now ships as Gate (v0.1.0): prompt when the
owner check is evaluable, return nil without prompting when it is not, so a
person with no Touch ID or passcode is never locked out of their own vault.
Delegating removes the duplicated policy logic and pins the dependency to a
released tag (was a pre-Gate pseudo-version).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 67d7ae6 into main Aug 31, 2026
13 checks passed
@tannevaled
tannevaled deleted the feat/biometric-use-gate branch August 31, 2026 08:53
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