aurorawebsoftware / filament-loginkit
This is my package filament-loginkit
Fund package maintenance!
:vendor_name
Installs: 52
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/aurorawebsoftware/filament-loginkit
Requires
- php: ^8.1
- filament/filament: ^3.0
- filament/forms: ^3.0
- filament/tables: ^3.0
- laravel/fortify: ^1.0
- spatie/laravel-package-tools: ^1.15.0
- twilio/sdk: *
- ysfkaya/filament-phone-input: ^3
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- 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
- dev-main
- 12.1.0
- 12.0.9
- 12.0.8
- 12.0.7
- 12.0.6
- 12.0.5
- 12.0.4
- 12.0.3
- 12.0.2
- 12.0.1
- 12.0.0
- 4.0.0
- dev-dependabot/github_actions/actions/checkout-6
- dev-filamentv4-upgrade
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-whatsapp-login-fix
- dev-whatsapp-login
- dev-sms-login-expired-fix
- dev-sms-login-fix
- dev-active-control-development
- dev-resendsmscode-fix
- dev-composer-fix
- dev-first-development
This package is auto-updated.
Last update: 2025-11-24 17:07:01 UTC
README
A flexible authentication kit for Filament that brings enhanced two-factor authentication, SMS login, and customizable login flows to your Laravel applications.
Table of Contents
- Installation
- User Model Changes
- Configuration
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
Installation
First, install the package via Composer:
composer require aurorawebsoftware/filament-loginkit
Then, run the install command to set up configuration, migrations, assets, and required dependencies:
php artisan filament-loginkit:install
Add the plugin to your PanelProvider:
plugin(FilamentLoginKitPlugin::make())
To require two-factor authentication for all users, use the forced() method:
plugin(FilamentLoginKitPlugin::make()->forced())
User Model Changes
Make sure your User model implements the necessary properties and traits:
<?php use AuroraWebSoftware\FilamentLoginKit\Traits\TwoFactorAuthenticatable; class User extends Authenticatable { use TwoFactorAuthenticatable; protected $fillable = [ 'phone_number', 'two_factor_type', 'is_2fa_required', 'sms_login_code', 'sms_login_expires_at', 'two_factor_code', 'two_factor_expires_at', 'is_active', 'whatsapp_login_code', 'whatsapp_login_expires_at' ]; protected $casts = [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'sms_login_expires_at' => 'datetime', 'is_2fa_required' => 'boolean', 'two_factor_expires_at' => 'datetime', 'is_active'=>'boolean' 'whatsapp_login_expires_at' => 'datetime', ]; }
Configuration
After publishing the config file, you can find it at config/filament-loginkit.php.
Login Methods
Enable/disable email and SMS login:
'email_login' => env('LOGINKIT_EMAIL_LOGIN_ENABLED', true), 'sms_login' => env('LOGINKIT_SMS_LOGIN_ENABLED', false),
Two-Factor Authentication
Set available two-factor methods: authenticator, email, sms
'options' => [ \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::authenticator, \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::email, \AuroraWebSoftware\FilamentLoginKit\Enums\TwoFactorType::sms, ],
Features
Enable or disable registration, multi-tenancy, or generic error messages:
'enabled_features' => [ 'register' => false, 'multi_tenancy' => false, 'generic_errors' => false, ],
SMS Service
To enable SMS authentication, you must implement your own SMS service using the provided interface.
You can find the interface at:
AuroraWebSoftware\FilamentLoginKit\Contracts\SmsServiceInterface
First, create a class that implements this interface. For example:
namespace App\Services; use AuroraWebSoftware\FilamentLoginKit\Contracts\SmsServiceInterface; class SmsService implements SmsServiceInterface { public function sendSms(string $phone, string $message): void { // Your SMS sending logic here } }
Then, register your service in the configuration file:
// config/filament-loginkit.php 'sms_service_class' => \App\Services\SmsService::class,
Note: Your SMS service must implement all methods required by SmsServiceInterface.
Rate Limits
Limit login and 2FA attempts to prevent abuse:
'rate_limits' => [ 'sms' => [ 'max_requests' => 5, 'per_minutes' => 1, ], 'sms_resend' => [ 'max_requests' => 2, 'per_minutes' => 1, ], 'login' => [ 'max_requests' => 5, 'per_minutes' => 1, ], 'two_factor' => [ 'max_requests' => 5, 'per_minutes' => 1, ], ],
Queues
Set whether notifications are queued:
'queue_notifications' => env('LOGINKIT_QUEUE_NOTIFICATIONS', true), 'email_queue' => env('LOGINKIT_EMAIL_QUEUE', 'filament-loginkit'), 'sms_queue' => env('LOGINKIT_SMS_QUEUE', 'filament-loginkit'),
The queue name used by Filament Loginkit is filament-loginkit.
To start the queue worker in Laravel, run the following command:
php artisan queue:work --queue=filament-loginkit
And more! Please check the config/filament-loginkit.php file for the full list of options.
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.