diff --git a/libraries/classes/Plugins/TwoFactor/Application.php b/libraries/classes/Plugins/TwoFactor/Application.php index 6db3ca5505..3056af3e46 100644 --- a/libraries/classes/Plugins/TwoFactor/Application.php +++ b/libraries/classes/Plugins/TwoFactor/Application.php @@ -90,13 +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' => $secret ]); } @@ -139,4 +141,3 @@ class Application extends TwoFactorPlugin return __('Provides authentication using HOTP and TOTP applications such as FreeOTP, Google Authenticator or Authy.'); } } - diff --git a/templates/login/twofactor/application_configure.twig b/templates/login/twofactor/application_configure.twig index 85fcdf8f25..b801920379 100644 --- a/templates/login/twofactor/application_configure.twig +++ b/templates/login/twofactor/application_configure.twig @@ -1,10 +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 }} +

+

+