raisulhridoy/laravel-2fa
Composer 安装命令:
composer require raisulhridoy/laravel-2fa
包简介
Laravel 2FA is a PHP implementation of the Google Two-Factor Authentication Module, supporting the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.
README 文档
README
This package provides a simple and intuitive way of adding two-factor authentication to your Laravel application. It's perfect for developers who want a lightweight package that gets the job done without any unnecessary complexity.
Installation
Use the package manager composer to install this package.
composer require raisulhridoy/laravel-2fa
Add the service provider in config/app.php file in the providers array as below:
RaisulHridoy\Laravel2FA\TwoFactorAuthServiceProvider::class,
Publish the package configuration
php artisan vendor:publish --provider="RaisulHridoy\Laravel2FA\TwoFactorAuthServiceProvider"
Specify table name corresponding to the 2FA functionality in ".env" file. By default, it will be 'users' respectively and "google2fa_secret", "google2fa_enabled" & "google2fa_verify_status" column will be added in this table.
TFA_WITH_TABLE=
For example, if you want to use "users" table for the 2FA functionality, then you have to specify like this in ".env" file.
TFA_WITH_TABLE=users
Run these commands to clear the cache and migrate the database.
php artisan config:clear php artisan cache:clear php artisan migrate
Basic Usage
# Initialize the namespace use RaisulHridoy\Laravel2FA\Http\App\TFA;
Full instruction coming soon ...............
raisulhridoy/laravel-2fa 适用场景与选型建议
raisulhridoy/laravel-2fa 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 06 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「2fa」 「two-factor-authentication」 「laravel-2fa」 「laravel-two-factor-authentication」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 raisulhridoy/laravel-2fa 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 raisulhridoy/laravel-2fa 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 raisulhridoy/laravel-2fa 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).
This package provides Laravel bindings and a Eloquent/Model trait for pragmarx/recovery package.
Enable Google 2FA (two factor authentication) for both, frontend- and backend accounts.
Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+
2FA integration for Laravel Backpack using Fortify
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-18