Repository navigation
Add opt-in passkey sign in, manageable from the admin panel - #384
Merged
Cannonb4ll merged 1 commit intoOct 15, 2026
Merged
Conversation
Admins can enable passkeys under Settings > General. Once enabled, users can register passkeys (Face ID, Touch ID, Windows Hello, security keys) on the Security tab of their profile and sign in with one from /login, which also covers the Filament admin panel through the shared web session. Built on laravel/passkeys, which Fortify 1.40 already pulls in. Fortify stays headless, so the two sign in routes are registered in routes/web.php next to the two-factor challenge and are hidden (404) while the setting is off. - Profile: add (name + password confirmation) and remove passkeys; the browser runs the WebAuthn ceremony and hands the credential back to Livewire for verification - Login page: "Sign in with a passkey" button, shown only when enabled and supported by the browser; passkey sign in skips the 2FA code - Admin: passkeys relation manager on the user edit page so admins can revoke a lost device; it stays visible after disabling while the user still has passkeys - WebAuthn verification failures become validation errors instead of 500s and are logged - Adds the passkeys table, the general.enable_passkeys setting and a passkeys rate limiter
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.
Summary
Adds passkey (WebAuthn) sign in as an opt-in feature. Like MCP and 2FA, it's off by default and an admin turns it on in the panel.
general.enable_passkeys, defaultfalse)./login, this covers the panel too. A passkey sign in skips the 2FA code, since passkeys require user verification (biometric/PIN).Implementation notes
laravel/passkeys, whichlaravel/fortify1.40 already pulls in, so there are no new dependencies.Fortify::ignoreRoutes()). Only the two guest sign in routes (passkeys/login/options,passkeys/login) are registered inroutes/web.php, next to the two-factor challenge.EnsurePasskeysAreEnabledreturns 404 while the setting is off, and the routes are throttled by a newpasskeyslimiter (10/min per IP).laravel/passkeysonly turns an unknown passkey into a validation error. A bad signature, wrong origin or challenge, or a cloned authenticator throws a rawWebauthnException, which would render a 500. Both the sign in controller and the profile registration catch these, log a warning, and return a normal error.addPasskeyaction and are pulled (single use) when the registration finishes, so finishing a registration always comes after a password confirmation.resources/js/passkeys.js, bundled inapp.js.passkeystable (the package's own schema) and the settings migration.Known limitation
Adding or removing a passkey asks for the current password, the same as enabling or disabling 2FA. Users who signed up through SSO and never set a password can't manage passkeys yet.
Test plan
tests/Feature/Auth/PasskeyLoginTest.php: button shown/hidden by the setting, endpoints 404 when disabled, discoverable options with required user verification, verified passkey signs in (and bypasses 2FA), unknown passkey and WebAuthn failures return 422 and leave the visitor a guesttests/Feature/Auth/PasskeyManagementTest.php: list, hidden when disabled, add requires correct password, creation options dispatched, finish stores the passkey, finish without a confirmed password rejected, WebAuthn failure not stored, remove own passkey (with password), can't remove someone else'stests/Feature/Filament/PasskeyAdminTest.php: disabled by default, admin can enable it, admin can revoke a user's passkey, relation manager visibilitymemory_limit=1G)APP_URL, so check it on a real domain.