[Web] Fix slow UI by switching QR provider and only generating qr image on demand

This commit is contained in:
andryyy
2019-03-19 08:45:08 +01:00
parent ca2ac00422
commit 6a13609bf0
4 changed files with 25 additions and 2 deletions

View File

@@ -36,7 +36,8 @@ foreach ($css_dir as $css_file) {
// U2F API + T/HOTP API
$u2f = new u2flib_server\U2F('https://' . $_SERVER['HTTP_HOST']);
$tfa = new RobThree\Auth\TwoFactorAuth($OTP_LABEL);
$qrprovider = new RobThree\Auth\Providers\Qr\QRServerProvider();
$tfa = new RobThree\Auth\TwoFactorAuth($OTP_LABEL, 6, 30, 'sha1', $qrprovider);
// Redis
$redis = new Redis();