An open API service indexing awesome lists of open source software.

https://github.com/marcelweidum/filament-passkeys

Use passkeys in your filament app
https://github.com/marcelweidum/filament-passkeys

filament filament-4 filament-passkey filament-passkeys filament-plugin filamentphp filamentphp-4 filamentphp-passkey filamentphp-passkeys filamentphp-plugin livewire passkey passkeys php plugin spatie-passkey spatie-passkeys

Last synced: 2 months ago
JSON representation

Use passkeys in your filament app

Awesome Lists containing this project

README

          

# Filament Passkeys

[![Latest Version on Packagist](https://img.shields.io/packagist/v/marcelweidum/filament-passkeys.svg?style=flat-square)](https://packagist.org/packages/marcelweidum/filament-passkeys)
[![Total Downloads](https://img.shields.io/packagist/dt/marcelweidum/filament-passkeys.svg?style=flat-square)](https://packagist.org/packages/marcelweidum/filament-passkeys)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/marcelweidum/filament-passkeys/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/marcelweidum/filament-passkeys/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
![Filament 4.x](https://img.shields.io/badge/Filament-4.x-007ec6?style=flat-square)
![Filament 5.x](https://img.shields.io/badge/Filament-5.x-44cc11?style=flat-square)

Use passkeys in your filament app.
This package is using the [passkeys package from spatie](https://spatie.be/docs/laravel-passkeys).



Filament Passkeys cover

 

**Version compatibility:** `3.x` supports Filament v5. For Filament v3 and v4, use the [`2.x` branch](https://github.com/MarcelWeidum/filament-passkeys/tree/2.x).

## Installation

1. Install the package via composer:

```bash
composer require marcelweidum/filament-passkeys
```

2. Add the package's interface and trait to your user model

```php
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;

// ...
}
```

3. Publish and run the migrations

```bash
php artisan vendor:publish --tag="passkeys-migrations"
php artisan migrate
```

4. Add the package provided routes

```php
// routes/web.php
Route::passkeys();
```

5. Add passkeys plugin to your Filament Panel

Add passkeys to a panel by adding the class to your Filament Panel's plugin() or plugins([]) method.

```php
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:

```bash
php artisan vendor:publish --tag="filament-passkeys-translations"
```

## Common problems
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.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [MarcelWeidum](https://github.com/MarcelWeidum)
- [Spatie](https://github.com/spatie)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.