Skip to main content

Crate laravel_passkey

Crate laravel_passkey 

Source
Expand description

Laravel Passkeys for Laravel Rust: passwordless authentication with WebAuthn passkeys.

A community port of Laravel Passkeys by Rivervo. It works with the @laravel/passkeys JavaScript client unchanged. See the README for installation and usage.

Modules§

actions
The actions that handle the WebAuthn logic: Laravel\Passkeys\Actions.
events
The events the package dispatches. Each carries the user, of your user model’s type, and the passkey, so a listener takes PasskeyRegistered<User>.
http
The package’s route handlers: PasskeyLoginController, PasskeyConfirmationController, and PasskeyRegistrationController, with the validation of their form requests.
webauthn_proto
The WebAuthn types the actions take, such as the browser’s PublicKeyCredential, from webauthn-rs-core. Protocol bindings

Structs§

Aaguids
Looks up authenticators by their AAGUID.
InvalidPasskey
A passkey that can’t be registered or verified: InvalidPasskeyException, a validation error on the credential field. A JSON client gets a 422 with the message, and a browser is redirected back with it, as for any failed validation.
Misconfigured
A misconfiguration that the package reports as a server error, such as an empty list of allowed origins: PHP’s RuntimeExceptions.
Passkey
A row of the passkeys table: a passkey registered by a user.
Passkeys
The callbacks the provider registers for the user model U, which the login route reads. The provider binds it in the container; handlers take it as Inject<Passkeys<U>>.
PasskeysConfig
The passkey settings, with the defaults of the package’s config/passkeys.php.
PasskeysServiceProvider
Registers the package’s configuration, the passkeys migration, and the passkey routes for the user model U.
RegistrationOptions
The options of a registration ceremony: PublicKeyCredentialCreationOptions, and what verifying the browser’s answer needs.
RequirePassword
Requires a recent password confirmation: Laravel’s password.confirm middleware (Illuminate\Auth\Middleware\RequirePassword), which Laravel Rust doesn’t have. It is the default passkeys.management_middleware.
UnsupportedTheme
An unsupported icon theme: PHP’s InvalidArgumentException.
VerificationOptions
The options of a verification (login or confirmation) ceremony: PublicKeyCredentialRequestOptions, and what verifying the browser’s answer needs.

Traits§

PasskeyAuthenticatable
A user who can register passkeys and log in with them.