Download the PHP package happenv-com/filament-passkeys without Composer

On this page you can find all versions of the php package happenv-com/filament-passkeys. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-passkeys

Filament Passkeys

![Filament Passkeys](art/banner.png)

Latest Version Tests PHPStan Quality Total Downloads

Multi-factor authentication for Filament panels using WebAuthn passkeys, powered by laravel/passkeys.

Key features

Requirements

Package Versions
PHP ^8.2 (CI runs 8.3 – 8.5)
Laravel 12, 13
Filament 4 (^4.13.3), 5 (^5.8)
laravel/passkeys ^0.2.1

Installation

Install the package via Composer:

Publish and run the migrations from laravel/passkeys:

Publish the laravel/passkeys config (optional, to tweak the relying party ID, allowed origins, timeout, etc.):

laravel/passkeys derives the relying party ID and the allowed origins from APP_URL. Make sure it matches the URL your panel is served from, or passkey ceremonies will be rejected.

Upgrading from spatie/laravel-passkeys

Both packages use a passkeys table and a config/passkeys.php file, so they cannot be installed side by side. Existing passkeys keep working after the switch; publish and run this package's upgrade migration instead of the laravel/passkeys one:

The migration renames authenticatable_id to user_id and data to credential, and rebuilds credential_id from the stored credential record. It does nothing when the table already has the laravel/passkeys schema. Remove the old config/passkeys.php published by Spatie and publish the new one if you need to customise it.

Configuration

Publish this package's config (optional):

Option Default What it does
redirect null Where to send the user after registering a passkey — see Customising the redirect URL.
register_passkeys_routes false Keeps the laravel/passkeys HTTP routes — see laravel/passkeys routes.
hide_challenge_confirm_button true Hides Filament's "Confirm sign in" button on a passkey-only challenge — see Passkey-only challenge.
auto_start_challenge true Opens the passkey prompt as soon as a passkey-only challenge appears — see Passkey-only challenge.

Optionally, publish the views and translations:

Usage

1. Prepare your User model

Implement the HasPasskeysAuthentication contract and use the InteractsWithPasskeysAuthentication trait. They build on the laravel/passkeys PasskeyUser contract and PasskeyAuthenticatable trait:

Passkey verification counts as enabled when hasPasskeysEnabled() returns true, which by default means the user has at least one passkey. If your user model is not App\Models\User, tell laravel/passkeys about it in a service provider:

2. Register the MFA provider in your panel

In your PanelProvider, register PasskeyAuthentication in the multiFactorAuthentication() array:

That's it. The MFA section in the user profile page now shows a "Passkey verification" entry with Set up / Turn off buttons. Once a passkey is registered, Set up becomes Add passkey and a table lists every passkey with a Remove button. After a user signs in with their password, Filament asks them to confirm with one of their passkeys.

Registering FilamentPasskeysPlugin is optional. Passkeys work as a second factor without it. The plugin only adds a "Sign in with a passkey" button directly on the login page, below the standard form, so users can sign in with a passkey without typing their email and password. Leave it out if you only want passkeys as a second factor.

3. Customising the redirect URL

By default, after registering a passkey the set-up modal closes and the user stays on their profile page. To redirect them somewhere instead:

You can also set a static URL via config/filament-passkeys.php:

4. Blocking passkey sign-in

The passwordless login button honours the laravel/passkeys authorization callback, e.g. to keep suspended accounts out:

Users who fail FilamentUser::canAccessPanel() are never signed in.

5. Passkey-only challenge

When a passkey is the only multi-factor method a user has turned on, the challenge needs nothing but the "Verify with passkey" button, since the ceremony submits the form itself. By default, the passkey prompt opens as soon as the challenge appears and Filament's "Confirm sign in" button is hidden. Two options in config/filament-passkeys.php turn this off:

Users with more than one method enabled always get Filament's usual challenge. Some browsers, notably Safari, only allow WebAuthn right after a user gesture and may refuse the automatic prompt; the button stays available as a fallback.

6. laravel/passkeys routes

Every ceremony runs through Livewire, so this package does not need the HTTP routes laravel/passkeys registers and turns them off. To keep them, e.g. for the @laravel/passkeys JavaScript client elsewhere in your app, set register_passkeys_routes to true in config/filament-passkeys.php.

How it works

This package is a Filament adapter on top of laravel/passkeys. Challenge generation, attestation and assertion verification and persistence are handled by its actions; the browser side uses @simplewebauthn/browser.

Testing your application

The package adds assertions to Livewire's Testable for Filament's login page, so your own tests can check that multi-factor authentication is enforced:

Assertion Passes when
assertMultiFactorChallengeRequired() Signing in stopped at the multi-factor challenge.
assertMultiFactorChallengeNotRequired() No multi-factor challenge is shown.
assertPasskeyChallengeOffered() The challenge is shown and offers a passkey, alone or next to other methods.
assertPasskeyChallengeNotOffered() No challenge is shown, or the challenge offers no passkey.

Translations

Supported languages

The package ships translations for every locale Filament supports. Publish them with php artisan vendor:publish --tag="filament-passkeys-translations" to adjust any wording.

Amharic (am) Persian (fa) Lithuanian (lt) Slovenian (sl)
Arabic (ar) Finnish (fi) Mizo (lus) Albanian (sq)
Azerbaijani (az) Filipino (fil) Latvian (lv) Serbian (Cyrillic) (sr_Cyrl)
Bulgarian (bg) French (fr) Macedonian (mk) Serbian (Latin) (sr_Latn)
Bengali (bn) Hebrew (he) Mongolian (mn) Swedish (sv)
Bosnian (bs) Hindi (hi) Malay (ms) Swahili (sw)
Catalan (ca) Croatian (hr) Burmese (my) Tajik (tg)
Central Kurdish (ckb) Hungarian (hu) Norwegian Bokmål (nb) Thai (th)
Czech (cs) Armenian (hy) Nepali (ne) Turkish (tr)
Danish (da) Indonesian (id) Dutch (nl) Ukrainian (uk)
German (de) Italian (it) Polish (pl) Urdu (ur)
Greek (el) Japanese (ja) Portuguese (pt) Uzbek (uz)
English (en) Georgian (ka) Portuguese (Brazil) (pt_BR) Vietnamese (vi)
Spanish (es) Khmer (km) Romanian (ro) Chinese (Simplified) (zh_CN)
Estonian (et) Korean (ko) Russian (ru) Chinese (Hong Kong) (zh_HK)
Basque (eu) Kurdish (ku) Slovak (sk) Chinese (Traditional) (zh_TW)

tests/Unit/TranslationsTest.php checks that every locale has exactly the keys English has.

Development

The package's JavaScript and CSS are built by bin/build.js into resources/dist, which is committed. After changing resources/js or resources/css, rebuild and commit the result — CI refuses outdated assets:

Upgrading

Breaking changes and how to migrate are described in UPGRADING for every major version.

Changelog

See GitHub releases for what has changed recently.

Contributing

See CONTRIBUTING for details.

Security vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). See License File for more information.



All versions of filament-passkeys with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.13.3 || ^5.8
laravel/passkeys Version ^0.2.1
spatie/laravel-package-tools Version ^1.14.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package happenv-com/filament-passkeys contains the following files

Loading the files please wait ...