otp: show secret as plaintext if a user can't scan qrcode

Fixes #4818

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2020-12-19 12:53:29 +01:00
parent 88ad78373d
commit 41271bc153
4 changed files with 7 additions and 0 deletions

View file

@ -344,6 +344,7 @@ class ConfigController extends Controller
return $this->render('WallabagCoreBundle:Config:otp_app.html.twig', [
'backupCodes' => $backupCodes,
'qr_code' => $this->get('scheb_two_factor.security.google_authenticator')->getQRContent($user),
'secret' => $secret,
]);
}

View file

@ -209,6 +209,7 @@ config:
two_factor_code_description_2: 'You can scan that QR Code with your app:'
two_factor_code_description_3: 'Also, save these backup codes in a safe place, you can use them in case you lose access to your OTP app:'
two_factor_code_description_4: 'Test an OTP code from your configured app:'
two_factor_code_description_5: "If you can't see the QR Code or can't scan it, enter the following secret in your app:"
cancel: Cancel
enable: Enable
entry:

View file

@ -209,6 +209,7 @@ config:
two_factor_code_description_2: 'Vous pouvez scanner le code QR avec votre application :'
two_factor_code_description_3: 'Noubliez pas de sauvegarder ces codes de secours dans un endroit sûr, vous pourrez les utiliser si vous ne pouvez plus accéder à votre application A2F :'
two_factor_code_description_4: 'Testez un code généré par votre application A2F :'
two_factor_code_description_5: 'Si vous ne voyez pas le code QR ou ne pouvez pas le scanner, saisissez la clé suivante dans votre application :'
cancel: Annuler
enable: Activer
entry:

View file

@ -20,6 +20,10 @@
document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code }}');
</script>
</p>
<p>
{{ 'config.otp.app.two_factor_code_description_5'|trans }} <pre>{{ secret }}</pre>
</p>
</li>
<li>
<p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p>