Download the PHP package alexgeno/phone-verification-laravel without Composer
On this page you can find all versions of the php package alexgeno/phone-verification-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexgeno/phone-verification-laravel
More information about alexgeno/phone-verification-laravel
Files in alexgeno/phone-verification-laravel
Package phone-verification-laravel
Short Description A Laravel library to verify a phone via notification channels. Any notification channel can be used as a sender. Redis(predis) or MongoDb can be used a storage.
License MIT
Homepage https://github.com/alexeygeno/phone-verification-laravel
Informations about the package phone-verification-laravel
Phone Verification via Laravel Notification Channels
Signing in or signing up on a modern website or mobile app typically follows these steps:
- A user initiates verification by submitting a phone number
- The user receives an SMS or a call with a one-time password (OTP)
- The user completes verification by submitting the OTP
This library is built on top of alexeygeno/phone-verification-php and allows to set this up
Supported features
- Easy switching between different storages and notification channels
- Configurable length and expiration time for OTP
- Configurable rate limits
- Localization
- Usage with different Laravel approaches: automatic injection, facade, and commands
- Logging notifications instead of sending real ones, beneficial for non-production environments
- Out-of-the-box routes for quick start
Requirements
- Laravel 9.x
- Any of the available Laravel Notification Channels: laravel/vonage-notification-channel, laravel-notification-channels/twilio, laravel-notification-channels/messagebird and many more
- Any of the supported storages: predis/predis, jenssegers/laravel-mongodb
Installation
Note: Redis as a storage and Vonage as a notification channel are defaults in the configuration
Usage
Automatic injection
Facade
Commands
Routes
Note: The package routes are available by default. To make them unavailable without redefining the service provider, change the bool key phone-verification.sender.to_log in the configuration
Configuration
Different storages and notification channels
To switch between available storages and notifications channels, install the respective package and update the configuration. For example, to use Mongodb as a storage and Twilio as a notification channel:
If the available options are not sufficient, you can redefine the service provider and add a custom storage (implementing \AlexGeno\PhoneVerification\Storage\I) or/and a sender (implementing \AlexGeno\PhoneVerification\Sender\I)
Publishing
Config
Localization
Migrations
Note: Only the MongoDB storage driver requires migrations