承接 ankurk91/laravel-otp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ankurk91/laravel-otp

最新稳定版本:1.4.0

Composer 安装命令:

composer require ankurk91/laravel-otp

包简介

One time password (OTP) generator and verifier.

README 文档

README

Packagist GitHub-tag License Downloads GH-Actions codecov

One time password (OTP) generator and verifier.

Installation

You can install the package via composer:

composer require "ankurk91/laravel-otp"

Publish the config file (optional)

You can publish the config file into your project.

php artisan vendor:publish --provider="Ankurk91\LaravelOTP\OTPServiceProvider" --tag="config"

Usage

You can use the global helper function

<?php
$phoneNumber = '+1234567890';

$secret = otp()->generate($phoneNumber, 6)
// You can send $secret via SMS/Email to user

otp()->match($phoneNumber, request('otp'));

otp()->forget($phoneNumber);

or you can use Facade

<?php
use Ankurk91\LaravelOTP\Facades\OTP;

$secret = OTP::generate($phoneNumber)

Note The OTP will be stored in default cache storage.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Security

If you discover any security issues, please email pro.ankurk1[at]gmail[dot]com instead of using the issue tracker.

This packages does not follow the HOTP or TOTP specification.

License

The MIT License.

统计信息

  • 总下载量: 433
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-09