Skip to content

Commit

Permalink
Display the secret for 2FA - #14128 (#14154)
Browse files Browse the repository at this point in the history
* 2FA Secret added
* 2FA Secret Displayed

Fix #14128

Signed-off-by: Raman Tehlan <ramantehlan@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
(cherry picked from commit 8dbae11)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information
ramantehlan authored and MauricioFauth committed May 3, 2018
1 parent 8af0343 commit 3054999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/classes/Plugins/TwoFactor/Application.php
Expand Up @@ -97,6 +97,7 @@ public function setup()
);
return Template::get('login/twofactor/application_configure')->render([
'image' => $inlineUrl,
'secret' => $_SESSION['2fa_application_key']
]);
}

Expand Down Expand Up @@ -139,4 +140,3 @@ public static function getDescription()
return __('Provides authentication using HOTP and TOTP applications such as FreeOTP, Google Authenticator or Authy.');
}
}

4 changes: 4 additions & 0 deletions templates/login/twofactor/application_configure.twig
Expand Up @@ -6,5 +6,9 @@
<img src="{{ image }}" />
</p>
<p>
{% trans "Secret/key:" %} <b>{{ secret }}</b>
</p>
<p>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" /></label>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off" /></label>
</p>

0 comments on commit 3054999

Please sign in to comment.