diff --git a/libraries/classes/Plugins/TwoFactor/Application.php b/libraries/classes/Plugins/TwoFactor/Application.php index 9993145a50..3056af3e46 100644 --- a/libraries/classes/Plugins/TwoFactor/Application.php +++ b/libraries/classes/Plugins/TwoFactor/Application.php @@ -90,14 +90,15 @@ class Application extends TwoFactorPlugin */ public function setup() { + $secret = $this->_twofactor->config['settings']['secret']; $inlineUrl = $this->_google2fa->getQRCodeInline( 'phpMyAdmin (' . $this->getAppId(false) . ')', $this->_twofactor->user, - $this->_twofactor->config['settings']['secret'] + $secret ); return Template::get('login/twofactor/application_configure')->render([ 'image' => $inlineUrl, - 'secret' => $_SESSION['2fa_application_key'] + 'secret' => $secret ]); } diff --git a/templates/login/twofactor/application_configure.twig b/templates/login/twofactor/application_configure.twig index 05f45b51af..b801920379 100644 --- a/templates/login/twofactor/application_configure.twig +++ b/templates/login/twofactor/application_configure.twig @@ -1,14 +1,13 @@ {{ Url_getHiddenInputs() }}
-{% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %} + {% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %}
-
+
- {% trans "Secret/key:" %} {{ secret }} + {% trans "Secret/key:" %} {{ secret }}
- - +