laravel/passkeys
Add passwordless WebAuthn/passkey authentication to Laravel. Install migrations, add a trait/contract to your User model, and use the @laravel/passkeys JS client for registration and login. Includes built-in routes for login, confirmation, and passkey management.
PasskeyAuthenticatable trait and PasskeyUser contract align with Laravel’s conventions (e.g., Authenticatable trait), reducing architectural friction.webauthn-lib (v5.3), the package adheres to FIDO2/CTAP standards, ensuring compliance with modern authentication protocols. The inclusion of a bundled AAGUID catalog simplifies authenticator identification without external dependencies.GenerateRegistrationOptions, VerifyPasskey), allowing customization without monolithic overrides. This fits well with Laravel’s service container and dependency injection patterns.PasskeyRegistered, PasskeyVerified, and PasskeyDeleted events, enabling integration with Laravel’s event system (e.g., logging, analytics, or third-party notifications).PasskeyAuthenticatable trait to the User model (or implement PasskeyUser contract).@laravel/passkeys npm client for frontend flows.passkeys table with columns for WebAuthn credentials (id, user_handle, public_key, sign_count, transports, etc.). The schema is opinionated but flexible—custom models can extend the base Passkey class.@laravel/passkeys) handles WebAuthn ceremonies (registration/verification) via navigator.credentials, while the server package processes responses. This separation of concerns aligns with modern SPAs and Laravel APIs.auth_id instead of user_id) may still require overrides.password.confirm middleware by default. Apps without password-based auth (e.g., API-only) may need to customize or disable this.webauthn-lib or Laravel compatibility.api, sanctum)? If so, configure passkeys.guard in the config.Passkey model or add a tenant_id column.throttle:6,1 sufficient for your traffic? Adjust passkeys.throttle or implement custom middleware.@laravel/passkeys npm package works with:
PasskeyAuthenticatable to the User model and publish migrations.passkeys.throttle based on traffic patterns.PasskeyVerified → increment "secure logins" metric).Auth::attempt()). Passkeys replace or supplement email/password.composer require laravel/passkeys.php artisan vendor:publish --tag=passkeys-migrations --tag=passkeys-config.User model: use PasskeyAuthenticatable.npm install @laravel/passkeys.passkeys.management_middleware).php artisan migrate.PasskeyRegistered/PasskeyVerified events.webauthn-lib and Laravel compatibility. The package uses pinned GitHub Actions SHAs (PR #21), reducing supply-chain risks.How can I help you explore Laravel packages today?