Download the PHP package laravel/passkeys without Composer
On this page you can find all versions of the php package laravel/passkeys. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel/passkeys
More information about laravel/passkeys
Files in laravel/passkeys
Package passkeys
Short Description Passwordless authentication using WebAuthn/passkeys for Laravel
License MIT
Homepage https://github.com/laravel/passkeys-server
Informations about the package passkeys
Laravel Passkeys
Passwordless authentication using WebAuthn/passkeys for Laravel.
Installation
Publish and run the migrations:
Optionally publish the config file:
Add the PasskeyAuthenticatable trait to your User model and implement the PasskeyUser contract:
The trait assumes a standard users schema with name and email columns, which authenticators show in their UI during registration and account selection. displayName falls back from name to email to the auth identifier, and username falls back from email to the auth identifier — override getPasskeyDisplayName() and getPasskeyUsername() if you want different values.
If you want to use custom models, override them in a service provider:
JavaScript Client
This package is designed to work with the @laravel/passkeys npm package:
Routes
The package automatically registers the following routes:
Guest Routes (Login)
GET /passkeys/login/options- Get login optionsPOST /passkeys/login- Verify passkey and authenticate
Authenticated Routes (Confirmation)
GET /passkeys/confirm/options- Get confirmation optionsPOST /passkeys/confirm- Confirm password via passkey
Authenticated Routes (Management)
GET /user/passkeys/options- Get registration optionsPOST /user/passkeys- Store new passkeyDELETE /user/passkeys/{passkey}- Delete passkey
Configuration
Events
The package fires the following events:
PasskeyRegistered- When a new passkey is registeredPasskeyVerified- When a user verifies with a passkeyPasskeyDeleted- When a passkey is deleted
Customization
Login Authorization Callback
You may block login after a valid passkey assertion (for example, suspended/banned accounts):
Return false to stop authentication, or throw your own ValidationException for a custom error message.
User-Bound Verification (Reauth / 2FA Step)
Use GenerateVerificationOptions with an authenticated user to scope allowed credentials to that user, then pass the same user into VerifyPasskey to enforce ownership:
This verifies the passkey without logging the user in again, which is useful for sensitive-action confirmation flows.
Custom Actions
Actions handle the core WebAuthn logic. Extend an action and bind it in your service provider:
Available actions:
GenerateRegistrationOptionsGenerateVerificationOptionsStorePasskeyVerifyPasskeyDeletePasskey
Custom Responses
Bind your own response classes to customize what happens after passkey operations:
Available response contracts:
PasskeyLoginResponse- After successful loginPasskeyConfirmationResponse- After successful confirmationPasskeyRegistrationResponse- After successful registrationPasskeyDeletedResponse- After passkey deletion
Custom Passkey Model
Extend the base model:
Disable Routes
To register your own routes:
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of passkeys with dependencies
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
web-auth/webauthn-lib Version 5.3.x