rezak/otp-auth is a Laravel package for a laravel package for otp endpoint implementation.
It currently has 0 GitHub stars and 1 downloads on Packagist.
Install it with composer require rezak/otp-auth.
Discover more Laravel packages by rezak
or browse all Laravel packages to compare alternatives.
Last updated
This package provides an OTP-based authentication system for Laravel applications, including SMS-based OTP generation and verification.
You can install the package via composer:
composer require rezak/otp-auth
php artisan vendor:publish --provider="RezaK\OtpAuth\Providers\OtpAuthServiceProvider"
SMSSenderInterface implementation.The package automatically registers the following routes:
/api/auth/otp/send - Send OTP to a mobile number./api/auth/otp/verify - Verify OTP for a mobile number.curl -X POST \
-H "Content-Type: application/json" \
-d '{"mobile_number": "09123456789"}' \
http://your-app-url/api/auth/otp/send
curl -X POST \
-H "Content-Type: application/json" \
-d '{"mobile_number": "09123456789", "otp": "123456"}' \
http://your-app-url/api/auth/otp/verify
Run the tests with:
composer test
The MIT License (MIT). Please see License File for more information.