c6digital / filament-passwordless-login
Simple passwordless login for Filament.
Requires
- php: ^8.1
- danharrin/livewire-rate-limiting: ^1.3
- filament/filament: ^3.0
- illuminate/contracts: ^10.0 | ^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9 | ^8.2
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0 | ^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is not auto-updated.
Last update: 2024-10-16 18:28:21 UTC
README
This package provides a new Login component that replaces the traditional email and password form with a simple passwordless login form.
Installation
You can install the package via composer:
composer require c6digital/filament-passwordless-login
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-passwordless-login-views"
Usage
Register the plugin on your Filament panel.
use C6Digital\PasswordlessLogin\PasswordlessLoginPlugin; public function panel(Panel $panel): Panel { return $panel ->//... ->plugin(PasswordlessLoginPlugin::make()); }
This will automatically register the new login page, overwriting the one provided by Filament. It also registers the necessary routes to authenticate users using a magic login link.
Using password in local environments
Sending login links emails during development can be difficult. If you are still storing passwords for your users, you can enable password authentication in local
environments.
PasswordlessLoginPlugin::make() ->allowPasswordInLocalEnvironment()
Now a "Password" field will be displayed on the Login page when APP_ENV=local
.
Action
This package also provides an Action
that can be used inside of Filament tables.
use C6Digital\PasswordlessLogin\Actions\LoginLinkAction; $table ->actions([ LoginLinkAction::make(), ]);
Command
If you need to generate a login link without accessing the site, you can use the passwordless:link
command.
php artisan passwordless:link {email}
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.