在环境文件中增加谷歌验证器开关

This commit is contained in:
2026-07-21 15:15:11 +08:00
parent e40de47b8b
commit a0056ff15b
11 changed files with 51 additions and 2 deletions

View File

@@ -20,6 +20,11 @@ class AdminTotp
private static ?TwoFactorAuth $tfa = null;
public static function isEnabled(): bool
{
return (bool) config('buildadmin.admin_totp_enable', true);
}
private static function tfa(): TwoFactorAuth
{
if (self::$tfa === null) {