Download the PHP package mix-code/filament-multi-2fa without Composer
On this page you can find all versions of the php package mix-code/filament-multi-2fa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mix-code/filament-multi-2fa
More information about mix-code/filament-multi-2fa
Files in mix-code/filament-multi-2fa
Package filament-multi-2fa
Short Description Implementing Email OTP and Authenticator App 2FA Logic with Trusted Devices Support
License MIT
Homepage https://github.com/mix-code/filament-multi-2fa
Informations about the package filament-multi-2fa
Filament Multi 2FA
Implementing Email OTP and Authenticator App 2FA logic with Trusted Devices support.
Features
Installation
You can install the package via composer:
Install plugin configs and migrations:
Optionally, you can publish the lang files with:
Optionally, you can publish the views using:
Usage
1️⃣ Register the plugin in your Filament Panel
In your PanelProvider (e.g., AdminPanelProvider):
Force 2FA setup:
2️⃣ Configure User Model
In your User
model, use the UsingTwoFA
trait, guarded attributes and casts:
You can also configure redirection after OTP verification by overriding redirectAfterVerifyUrl
:
To list user trusted devices:
3️⃣ Features Automatically Handled by the Plugin:
- 🛡️ 2FA Setup Page (users can select Email OTP or Authenticator App)
- 🔑 OTP Verification Page to protect access based on trusted device and 2FA status
- 🖥 Trusted Device Middleware to check trusted device cookies and enforce OTP verification
- 🔐 Adds a shortcut in the user menu to access the 2FA setup page
4️⃣ Automatic Logout Handling
When users log out, the plugin clears their two_factor_confirmed_at
column automatically:
5️⃣ Customize settings from the config file
📝 Notes:
- The plugin automatically injects the
CheckTrustedDevice
middleware to protect your Filament admin routes. - After OTP verification, users are redirected to the current panel’s dashboard.
Testing
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
- Mohamed Alaa El-Din Mohamed
- Hamza Omar Mohamed
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-multi-2fa with dependencies
bacon/bacon-qr-code Version ^3.0
chillerlan/php-qrcode Version ^5.0
filament/filament Version ^3.0
pragmarx/google2fa Version ^8.0
pragmarx/google2fa-qrcode Version ^3.0
spatie/laravel-package-tools Version ^1.15.0