1.优化谷歌验证器

This commit is contained in:
2026-06-24 16:36:30 +08:00
parent 3e88a5dd91
commit 21def75ef1

View File

@@ -27,7 +27,8 @@ class AdminTotp
if ($issuer === '') {
$issuer = 'BuildAdmin';
}
self::$tfa = new TwoFactorAuth(new BaconQrCodeProvider(), $issuer);
// 使用 SVG 格式,避免依赖 imagick 扩展PNG 默认需要 ImagickImageBackEnd
self::$tfa = new TwoFactorAuth(new BaconQrCodeProvider(format: 'svg'), $issuer);
}
return self::$tfa;
}