alt-design/alt-google-2fa
Composer 安装命令:
composer require alt-design/alt-google-2fa
包简介
Alt Google 2FA addon! Uses google2fa-laravel to integrate it into Statamic.
README 文档
README
Google 2FA - just not requiring like, an hour of setup and config.
Heavily uses https://github.com/antonioribeiro/google2fa-laravel - big shout out 🫶
Features
- Select who needs 2FA enforced by super users and roles
- Select optional user roles that can access 2FA
- Works on Front End and Control Panel
How to Install
composer require alt-design/alt-google-2fa
Basic usage
Settings
Just nip into the settings, few options
- Enforced / Optional / Off
- Enforced - Users matching the criteria have to have 2FA on to access the site.
- Optional - As it says on the tin, the routes are available if you fancy.
- Off - Just turns off the 2FA requirements for Super Users
Using your own template
Want to use your own template? Don't blame ya! Luckily we've built a tag in to generate the QR code. Template just needs to vaguely look like this:
<!-- QR Tag -->
<s:AltGoogle2FA /> (Blade) or {{ alt-google-2fa }} if you're using Antlers)
<!-- OTP Form ->
<form action="{{ route('alt-google-2fa.verify') }}" method="POST">
@csrf
<input name="one_time_password" type="text" placeholder="OTP Code">
<button type="submit" class="btn btn-primary">Authenticate</button>
</form>
<!-- Just so people don't get stuck -->
<a href="{{ route('statamic.logout') }}">
Cancel & Logout
</a>
Example manual inclusion of enabling/disabling 2FA.
{{ if {AltGoogle2FA:is-enabled} }}
<a href="{{ route:alt-google-2fa.disable-2fa }}">Disable</a>
{{ else }}
<a href="{{ route:alt-google-2fa.enable-2fa }}">Enable</a>
{{ /if }}
Using Database Users?
No problemo! You'll just need to publish the database migration and run it!
php artisan vendor:publish --tag=alt-google-2fa-migrations
php artisan migrate
Locked yourself out
Oop - you can just disable the settings using the content/alt-google-2fa/settings.yaml, or remove the 2FA field values on your user.
Questions etc
Drop us a big shout-out if you have any questions, comments, or concerns. We're always looking to improve our addons, so if you have any feature requests, we'd love to hear them.
Also - check out our other Statamic bits!
Starter Kits
Addons
- Alt SEO Addon
- Alt Redirect Addon
- Alt Sitemap Addon
- Alt Akismet Addon
- Alt Password Protect Addon
- Alt Cookies Addon
- Alt Inbound Addon
Postcardware
Send us a postcard from your hometown if you like this addon. We love getting mail from other cool peeps!
Alt Design
St Helens House
Derby
DE1 3EE
UK
alt-design/alt-google-2fa 适用场景与选型建议
alt-design/alt-google-2fa 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 797 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 01 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 alt-design/alt-google-2fa 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 alt-design/alt-google-2fa 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 797
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-29