Skip to content

Unlock with Touch ID on Macs - #30

Merged
aakashns merged 3 commits into
mainfrom
touch-id
Oct 17, 2026
Merged

aakashns merged 3 commits into
mainfrom
touch-id

Conversation

@aakashns

@aakashns aakashns commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

On a Mac with Touch ID, writui can now unlock with your fingerprint.

What changed

  • "Create your vault" has a "[ ] Unlock with Touch ID" box under the password boxes, on Macs that can use it. Click it or press Ctrl+T to tick it.
  • Settings has a "Touch ID" switch, also shown only on Macs that can use it. Once Touch ID is on, writui asks for your fingerprint as soon as it starts.
  • After locking (Ctrl+O), press Enter, or click the Touch ID button next to Unlock.
  • The password always works too. Cancel the fingerprint prompt, or just type it. Over SSH, writui never asks for a fingerprint (the prompt would appear on a screen nobody is looking at).
  • Where Touch ID is available but off, the unlock screen's Overview has one more line pointing to Settings.
  • Unlocking with Touch ID is instant, because the slow password check is skipped.

How it works (and why not the keychain)

Storing the password in the keychain behind Touch ID needs the app to be signed with an Apple developer identity, and writui's releases aren't. A plain keychain entry would also make macOS ask for your Mac password after every writui upgrade. So writui uses the Mac's Secure Enclave (the chip behind Touch ID) instead:

  • Turning it on creates a key inside the Secure Enclave and uses it to lock away your vault's key. The result goes in ~/.config/writui/touch-id/, one file per vault. The file is useless on any other computer, and even on this Mac it only opens after a fingerprint. The Secure Enclave enforces that, not writui.
  • Upgrades don't affect it: I tested that a different build can use the key.
  • Adding a new fingerprint to the Mac deliberately stops it working, so someone who knows your Mac password can't add their own finger to get in. writui says Touch ID didn't work, and your next password unlock sets it up again on its own.
  • Nothing changes inside the vault: no migration, and your password and writing are untouched. Turning Touch ID off deletes that one file.

The details are in docs/DECISIONS.md.

Try it

gh pr checkout 30 && cargo run

(Debug builds use .dev-data/, password writui-dev.)

  1. Unlock with the password, press s, go down to Touch ID, press Enter: it reads "on".
  2. Press Ctrl+O to lock, then Enter: the fingerprint prompt appears. Touch the sensor and you're back on Settings.
  3. Lock again, press Enter, and this time click Cancel on the prompt. You should get "Touch ID cancelled." (Confirmed by the creator.)
  4. Quit and run cargo run again: it asks for the fingerprint straight away.
  5. To see the checkbox: cargo run -- --db /tmp/w/writui.db, then click "[ ] Unlock with Touch ID" (or press Ctrl+T) before creating the vault.

Your real vault only gets Touch ID once this is released and you turn it on in Settings there.

Screenshots

Creating a vault, with the Touch ID box ticked:

Create your vault with the Touch ID box

Locked, with Touch ID on:

Locked screen with Unlock and Touch ID buttons

The Settings switch:

Settings with Touch ID on

On a Mac where it's off, the Overview points to it:

Unlock screen with the Touch ID tip

The landing page's privacy point now mentions it:

Landing page point

Version bumped to 0.18.0.

🤖 Generated with Claude Code

On a Mac with Touch ID, turn on "Touch ID" in Settings and writui asks
for your fingerprint when it starts, instead of the password. After
locking with Ctrl+O, press Enter (or click "Touch ID") to unlock with a
fingerprint. The password always works too: type it, or cancel the
fingerprint prompt.

Touch ID applies to this Mac and this vault only, and keeps working
across upgrades without asking for your Mac's password. Your vault's key
is sealed with a key in the Mac's Secure Enclave, which only opens it
after a fingerprint, and kept in ~/.config/writui/touch-id/. Adding a new
fingerprint to the Mac stops it working until you next unlock with the
password, which sets it up again. Unlocking with Touch ID is also
instant, as the password no longer needs to be checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: In progress 🔵

View logs ↗
4c08510 2026-10-17T12:36:25.409Z View logs ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 3bfc965 2026-10-17T12:29:29.527Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 3d4d4d6 2026-10-17T12:13:11.167Z Visit the dashboard ↗

On a Mac with Touch ID, "Create your vault" has an "Unlock with Touch ID"
box under the password boxes: click it, or press Ctrl+T, to tick it, and
the new vault unlocks with your fingerprint from the start.

The unlock screen keeps its "Unlock" button, with a separate "Touch ID"
button next to it once Touch ID is on. Cancelling the fingerprint prompt
now just says "Touch ID cancelled."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aakashns

Copy link
Copy Markdown
Owner Author

Done:

  • Checkbox on "Create your vault": "[ ] Unlock with Touch ID" under the password boxes, only on Macs that can use Touch ID. Unticked at first; a click or Ctrl+T ticks it (Ctrl+T is shown in the hint bar).
  • Cancel message: now just "Touch ID cancelled."
  • Unlock button: it always says "Unlock" again. Touch ID has its own button to the right of it. Your message cut off after "replaced it with", so I read it as wanting both buttons. Tell me if you meant something else.

Create your vault with the Touch ID box

Locked screen with Unlock and Touch ID buttons

Ticked, the box on "Create your vault" reads "[✓] Unlock with Touch ID".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aakashns

Copy link
Copy Markdown
Owner Author

The ticked box now shows a tick: "[✓] Unlock with Touch ID".

Create your vault with the ticked box

@aakashns
aakashns merged commit 6453c39 into main Oct 17, 2026
2 of 3 checks passed
@aakashns
aakashns deleted the touch-id branch October 17, 2026 12:36
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