Download the PHP package ooriyap/filament-simple-otp without Composer
On this page you can find all versions of the php package ooriyap/filament-simple-otp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ooriyap/filament-simple-otp
More information about ooriyap/filament-simple-otp
Files in ooriyap/filament-simple-otp
Package filament-simple-otp
Short Description FilamentPHP Simple OTP & Password Authentication Plugin with Dynamic Model Support
License MIT
Informations about the package filament-simple-otp
Filament Simple OTP
A flexible, lightweight, and customizable OTP (One-Time Password) & Mobile Authentication plugin for FilamentPHP. Supports dynamic user models, SMS.ir integration, logging drivers, rate limiting, and built-in profile/admin management.
Features
- 🔐 OTP Mobile Authentication: Seamless mobile-based login and password authentication for Filament panels.
- 📱 Flexible SMS Drivers: Built-in support for
SmsIrDriver,LogDriver,NotificationDriver,ArrayDriver, or custom driver classes/closures. - 🎯 Dynamic User Model: Bind to custom
UserorAdminEloquent models dynamically. - ⏱️ Throttling & Rate Limiting: Built-in brute-force protection for OTP verification and SMS resend requests.
- 👤 Profile & Admin Management: Built-in Edit Profile page and Admin Resource ready out of the box.
- 🌐 Multilingual Support: Fully localized for Persian (
fa), English (en), and easily extendable.
Requirements
- PHP:
^8.2 - Laravel:
^10.0 | ^11.0 | ^12.0 | ^13.0 - Filament:
^3.0 | ^4.0 | ^5.0
Installation
Install the package via Composer:
Publish and run package database migrations:
(Optional) Publish the configuration file:
(Optional) Publish translation files:
Usage & Configuration
Register SimpleOtpPlugin in your Filament Panel Provider (e.g. AdminPanelProvider.php):
Driver Configuration
SMS.ir Driver
Add your SMS.ir credentials to your .env file:
Log Driver (Development & Local Testing)
For local development or testing without consuming SMS credits, use LogDriver::class:
The generated OTP verification code will be written directly to storage/logs/laravel.log.
Custom Driver
Implement OtpDriverContract to create your own SMS gateway driver:
Then register it in the plugin:
Configuration Reference
| Method | Description | Default |
|---|---|---|
adminModel(string $modelClass) |
Set the authenticatable user model | App\Models\User |
otpCode(int $length, int $expiresIn) |
Configure OTP length and expiry duration (seconds) | 6, 180 |
rateLimit(int $attempts, int $decaySeconds) |
Verification rate limit settings | 5 attempts / 60s |
resendLimit(int $attempts, int $decaySeconds) |
Resend SMS rate limit settings | 3 attempts / 60s |
driver(mixed $driver) |
Set OTP driver (SmsIrDriver, LogDriver, etc.) |
Auto-detected |
profilePage(bool $enabled) |
Enable/disable built-in Edit Profile page | true |
adminResource(bool $enabled) |
Enable/disable built-in Admin Resource | true |
Testing
Run tests using Pest:
License
The MIT License (MIT). Please see LICENSE for details.
All versions of filament-simple-otp with dependencies
cryptommer/smsir Version ^1.2
filament/filament Version ^3.0|^4.0|^5.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0