lyne007 / auth-recaptcha
为 laravel-admin 添加 Google reCAPTCHA。
v1.0
2022-02-14 10:09 UTC
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.6
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-09-15 08:00:57 UTC
README
为 laravel-admin 添加 Google reCAPTCHA(无感知)
截图
安装
composer require lyne007/auth-recaptcha
配置
- 在
config/admin.php
文件的扩展部分添加配置
'extensions' => [ 'auth-recaptcha' => [ // set to false if you want to disable this extension 'enable' => true, // set to false if you want to disable icon 'iconDisplay' => true, // reCAPTCHA:v3 keys 'siteKey' => 'your google reCAPTCHA site key', 'secretKey' => 'your google reCAPTCHA secret key', ] ],
注册并获取 reCAPTCHA 密钥;https://www.google.com/recaptcha
- 在
config/admin.php
文件的 excepts 部分排除 CAPTCHA 界面限制
'excepts' => [ 'auth/login', 'auth/logout', // add 'auth/api/recaptcha' ],
用法
在浏览器中打开您的登录页面
许可证
许可协议:MIT 许可证https://github.com/lyne007/auth-recaptcha/blob/master/LICENSE