bbim / otpify
Laravel OTP verification library with multiple drivers
dev-main
2025-09-07 10:09 UTC
Requires
- php: ^8.2
- laravel/framework: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.0|^11.0
This package is not auto-updated.
Last update: 2025-09-08 08:33:14 UTC
README
A comprehensive Laravel package for OTP (One-Time Password) verification with multiple drivers support including SMS, Email, and external services.
Features
- ๐ Multiple drivers support (SMS, Email, Absher, Authorization)
- ๐ Secure OTP generation and validation
- โฐ Configurable expiration times
- ๐ฑ Easy integration with existing Laravel projects
- ๐งช Fake drivers for testing
- ๐ Multi-language support
Installation
composer require bbim/otpify
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="Bbim\Otpify\Providers\OtpifyServiceProvider"
Usage
Basic Usage
use Bbim\Otpify\Facades\Otpify; // Generate OTP $otp = Otpify::generate('user@example.com'); // Verify OTP $isValid = Otpify::verify('user@example.com', '123456');
Available Drivers
- Email Driver: Send OTP via email
- SMS Driver: Send OTP via SMS (Twilio integration)
- Absher Driver: Integration with Absher service
- Authorization Driver: Custom authorization flow
- Fake Driver: For testing purposes
Requirements
- PHP >= 8.2
- Laravel >= 10.0
License
MIT License