← all repositories
jonnyoo/glance

Face unlock for your Mac, minus the depth sensor Apple won't give you

Glance uses your MacBook webcam and an ArcFace model to unlock your Mac by typing your password for you when it sees your face — a convenience feature, and honest about it.

★1.5k stars Swift Computer Vision
glance
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

Glance watches the lock screen with your webcam and, when it recognizes you and its liveness checks pass, types your stored password to unlock the Mac. Enrollment captures your face from nine head angles, converts each frame into a 512-dimensional embedding, and throws the image away. The UI lives in the notch — a pill that expands into a scan animation, with haptics on hover and a fallback pill design for notchless Macs.

The interesting bit

The liveness detection is thoughtfully designed: over a rolling ~2-second window it weighs deny cues (screen glare, a phone-shaped rectangle framing the face) against confirm cues (nose parallax, blinks, 3D landmark geometry). A deny cue fails the scan outright; confirm cues are optional because a real person can sit perfectly still. There’s also a hidden Face Lab debug console (click the app icon five times in Settings → About) to inspect real recognition and liveness values.

Key highlights

  • Everything runs on-device via Vision and Core ML; no face data, frames, or credentials ever leave the machine
  • Embeddings encrypted with AES-GCM; the password’s 256-bit AES key sits in the Keychain behind Touch ID
  • Multiple identities — enroll yourself with glasses, a beard, or different lighting, and toggle them off without deleting
  • Unlock requires five conditions: authorized session, lock screen active, identity match above threshold, liveness pass, and accessibility permission
  • The Touch ID session auto re-locks after an idle period you choose, so an unattended Mac doesn’t stay authorized

Caveats

  • The README is blunt: this is not as secure as Face ID. A MacBook webcam sees a flat 2D image, so Glance does not reliably defeat a video of you, and only beats printed photos and phone screens with heavy liveness detection on
  • macOS has no API for third-party login authorization, so Glance literally types your password into the lock screen via accessibility permissions
  • Not accepting PRs; fork it if you want changes

Verdict

Worth a look if you miss Face ID on your MacBook and accept that you’re trading some security for convenience — the README’s honesty about that tradeoff is refreshing. Skip it if your threat model includes someone with a video of your face.

Frequently asked

What is jonnyoo/glance?
Glance uses your MacBook webcam and an ArcFace model to unlock your Mac by typing your password for you when it sees your face — a convenience feature, and honest about it.
Is glance open source?
Yes — jonnyoo/glance is open source, released under the MIT license.
What language is glance written in?
jonnyoo/glance is primarily written in Swift.
How popular is glance?
jonnyoo/glance has 1.5k stars on GitHub.
Where can I find glance?
jonnyoo/glance is on GitHub at https://github.com/jonnyoo/glance.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.