Use passkeys in your filament app. This package is using the passkeys package from spatie.
Â
Version compatibility: 3.x supports Filament v5. For Filament v3 and v4, use the 2.x branch.
composer require marcelweidum/filament-passkeys
namespace App\Models; use Spatie\LaravelPasskeys\Models\Concerns\HasPasskeys;use Spatie\LaravelPasskeys\Models\Concerns\InteractsWithPasskeys;// ... class User extends Authenticatable implements HasPasskeys{ use HasFactory, Notifiable, InteractsWithPasskeys; // ...}
php artisan vendor:publish --tag="passkeys-migrations"php artisan migrate
// routes/web.phpRoute::passkeys();
Add passkeys to a panel by adding the class to your Filament Panel's plugin() or plugins([]) method.
use MarcelWeidum\Passkeys\PasskeysPlugin;Â public function panel(Panel $panel): Panel{ return $panel ->plugins([ PasskeysPlugin::make(), ])}
Don't forget to add ->profile() to you panel as well to manage your passkeys.
(Optional) If you want to customize the translations, you can publish the translations by running:
php artisan vendor:publish --tag="filament-passkeys-translations"
If you're having problems creating passkeys on your profile page, check if your APP_URL in the .env file is set to the correct url of the application.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.