alrez96/laravel-otp
最新稳定版本:v1.2.0
Composer 安装命令:
composer require alrez96/laravel-otp
包简介
OTP login system for the Laravel framework.
关键字:
README 文档
README
Introduction
This is a simple package for implementing the OTP system in Laravel, which only includes generating the token and validating it. You can use this package alongside Laravel's authentication system or the laravel/breeze package.
Installation
You can install the package via composer:
composer require alrez96/laravel-otp
Configuration
You should publish the migration and the config/otp.php config file with:
php artisan vendor:publish --provider="Alrez96\LaravelOtp\OtpServiceProvider"
Usage
Generate OTP Token
<?php use Alrez96\LaravelOtp\Facades\Otp; Otp::generateToken(string $identifier); // or using helper otp()->generateToken(string $identifier);
Validate OTP Token
<?php use Alrez96\LaravelOtp\Facades\Otp; Otp::validateToken(string $identifier, string $token); // or using helper otp()->validateToken(string $identifier, string $token);
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-09