Repository navigation
feat(auth): sign in with passkeys, no passwords - #73
Merged
Merged
Conversation
People sign in with a passkey (WebAuthn): fingerprint, face or device PIN. The first admin makes one on the setup page; everyone else gets a one-time sign-in link from People, `lens users link`, or "Lost your passkey?" by email. Profile and sign-in manages passkeys. Fresh installs have no passwords (auth.passwords off); installs that already use them keep them until an admin turns them off, which needs an admin with a passkey. The browser runs the ceremony against the API through the web app, which knows the site's origin; the API answers a one-time ticket that NextAuth's "ticket" provider swaps for a session. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
On a plain http:// address (where browsers refuse passkeys) setup now takes the one-time setup code alone, and a sign-in link signs in by itself once, so Lens never falls back to a password. Also from review: per-visitor throttles no longer share one bucket, removing a passkey keeps one for the current site, an emailed link no longer cancels an admin's link, and a link isn't spent when the passkey limit is reached. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Keeps both changelog entries and setup tests; main's model-server test turns passwords on before signing in with one. The setup page now fills in the code from /setup?code=… as the one-line installer expects. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Keeps both the Sign-in and Components settings sections and both test config entries; regenerated the OpenAPI client. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Regenerated the OpenAPI client over main's SPARQL and metadata routes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Regenerated the OpenAPI client over main's assistant and voice routes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Sign-in link emails go through the email server set up in Settings › Email, like password resets, and their links use the app's address. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Keeps the passwordless setup form with #67's setup-link hint (the code filled in from the link, or `make setup-code` to copy). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
New people get a namespace role and a sign-in link in the same step. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc
6 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: everyone signed in with an email and password; the first admin chose a password on the setup page.
After: people sign in with a passkey (fingerprint, face or device PIN, or a phone nearby). A fresh install has no passwords at all, not even on a plain
http://address.http://address (not localhost) browsers refuse passkeys, so there the code alone creates the admin, still with no password.http://address the page offers a one-time sign-in link instead. The password form only shows where an admin allows passwords.lens users link email). Opening it adds a passkey and signs in; on plainhttp://the link signs in by itself, once. "Get a sign-in link" emails one through Settings › Email. Admins can remove someone's passkeys, which signs them out everywhere.Motivation and Context
Adeel asked for passkeys with no passwords at all. This is the first of the sign-in PRs in this thread; external OIDC/OAuth sign-in (Google, GitHub, Microsoft, generic OIDC), the built-in Cloudflare tunnel and hardening follow as separate PRs.
How: py_webauthn (
webauthn2.8) checks the ceremonies. The browser runs them against the API through the web app (so the API knows the site's origin; forwarded hosts are only accepted for known hosts or trusted proxies) and gets a one-time, two-minute ticket, which a new NextAuthticketprovider swaps for the usual token pair. User verification is required and cloned keys (counter going backwards) are refused. Sign-in link tokens live in the URL fragment, so they never reach a server log.Review fixes: per-visitor throttles no longer share one bucket when the visitor is unknown, a link request no longer cancels an admin's link, a link isn't spent when the passkey limit is reached.
Screenshots (if appropriate):
Checked end to end in Chromium with a virtual authenticator: setup with a passkey, sign in with it, Profile lists it, an admin makes a sign-in link and a second browser adds a passkey through it. On a non-secure origin: code-only setup with no password field, the login page offers a sign-in link, and the link signs in by itself.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01PdZQpHGY1mLEGZYNTpo6jc