Download the PHP package xefi/laravel-passkey-api without Composer
On this page you can find all versions of the php package xefi/laravel-passkey-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xefi/laravel-passkey-api
More information about xefi/laravel-passkey-api
Files in xefi/laravel-passkey-api
Package laravel-passkey-api
Short Description A Laravel package for passkey authentication apis
License MIT
Informations about the package laravel-passkey-api
Laravel Passkey
A Laravel package for passkey (WebAuthn/FIDO2) authentication — register and verify passkeys through a clean REST API, with a swappable authentication action to support Sanctum, Passport, web sessions, or any custom guard.
Full documentation at laravel-passkey.xefi.com.
Requirements
- PHP
^8.3 - Laravel
^12.0or^13.0
Installation
Add the HasPasskeys trait to your User model:
Configuration
Key options in config/passkey.php:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Enable / disable the package |
timeout |
60000 |
WebAuthn operation timeout (ms) |
challenge_length |
32 |
Challenge size in bytes |
user_model |
App\Models\User |
Authenticatable model |
session_guard |
null |
Guard used by CreateWebSessionAction (falls back to Laravel default guard) |
auth_action |
CreateWebSessionAction |
Action invoked on successful login |
Authentication Actions
The login endpoint delegates to a swappable action class. Three are provided out of the box:
You can also bind your own implementation of Xefi\LaravelPasskey\Contracts\PasskeyAuthAction.
API Endpoints
Passkey Management (requires authentication)
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/passkeys |
List passkeys for the authenticated user |
POST |
/api/passkeys/register/options |
Get registration options |
POST |
/api/passkeys/register |
Register a new passkey |
Authentication (public)
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/passkeys/verify/options |
Get verification options |
POST |
/api/passkeys/verify |
Verify a passkey (MFA / re-auth) |
POST |
/api/passkeys/login |
Authenticate and invoke the auth action |
Full request/response schemas are available in the documentation.
Typical Flow
Support us
Since 1997, XEFI is a leader in IT performance support for small and medium-sized businesses through its nearly 200 local agencies based in France, Belgium, Switzerland and Spain. A one-stop shop for IT, office automation, software, digitalization, print and cloud needs. Want to work with us?
License
MIT — see LICENSE.
All versions of laravel-passkey-api with dependencies
illuminate/support Version ^12.0|^13.0
spomky-labs/cbor-php Version ^3.0
web-auth/cose-lib Version ^4.0