diff --git a/src/lib/Controllers/PreferencesController.php b/src/lib/Controllers/PreferencesController.php index c89c142..cc3f05a 100644 --- a/src/lib/Controllers/PreferencesController.php +++ b/src/lib/Controllers/PreferencesController.php @@ -128,7 +128,7 @@ protected function getSecurityTab(): DataTab if (!$authenticatorData->isTwofaEnabled()) { $authenticatorData->setIV(AuthenticatorService::makeInitializationKey()); - $qrCode = $this->authenticatorService->getQrCodeFromServer($userData->getLogin(), $authenticatorData->getIV()); + $qrCode = $this->authenticatorService->getUserQRUrl($userData->getLogin(), $authenticatorData->getIV()); } $template->assign('qrCode', $qrCode); diff --git a/src/lib/Services/AuthenticatorService.php b/src/lib/Services/AuthenticatorService.php index 7d60c20..b5b7979 100644 --- a/src/lib/Services/AuthenticatorService.php +++ b/src/lib/Services/AuthenticatorService.php @@ -163,7 +163,7 @@ public function getQrCodeFromUrl(string $login, string $iv) */ public function getUserQRUrl(string $login, string $iv): string { - $qrUrl = 'https://www.google.com/chart?chs=150x150&chld=M|0&cht=qr&chl='; + $qrUrl = 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data='; $qrUrl .= urlencode('otpauth://totp/sysPass:syspass/' . $login . '?secret=' . $iv . '&issuer=sysPass'); return $qrUrl; diff --git a/src/themes/material-blue/views/userpreferences/preferences-security.inc b/src/themes/material-blue/views/userpreferences/preferences-security.inc index 830e0f8..3178217 100644 --- a/src/themes/material-blue/views/userpreferences/preferences-security.inc +++ b/src/themes/material-blue/views/userpreferences/preferences-security.inc @@ -10,112 +10,179 @@ $chk2FAEnabled = $_getvar('chk2FAEnabled'); ?>
- vpn_key - + vpn_key +
-
+ + + + + + + + +
+ +
+ getIconHelp()->getIcon(); ?> +
+
+

+ +

- - - + - - - - - - +
+
+ getIconWarning()->getIcon(); ?> +
+ +
+ + + + + + + - - - - - - -
- -
getIconHelp()->getIcon(); ?>
-
-

- -

+

+ +

+
+
+ -

- -

- -
- - -
- + -
- QR Code -
- -

- +
+ QR Code +
+ +

+ +

+ -
- - -
+
+ + +
-
-
getIconWarning()->getIcon(); ?>
- -
-
-
-
- - -
-
+ + +
+ + +
+
- - remove_red_eye -
+ +
+ + remove_red_eye +
- - + +
- +