mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Show data for manual setup of the google authenticator.
This commit is contained in:
parent
25105ba7d4
commit
8c5cf6f9e0
2 changed files with 17 additions and 1 deletions
|
@ -20,7 +20,7 @@ class TFASettingsType extends AbstractType
|
|||
{
|
||||
$builder->add('google_confirmation', TextType::class, [
|
||||
'mapped' => false,
|
||||
'attr' => ['maxlength' => '6', 'minlength' => '6', 'pattern' => '\d*'],
|
||||
'attr' => ['maxlength' => '6', 'minlength' => '6', 'pattern' => '\d*', 'autocomplete' => 'off'],
|
||||
'constraints' => [new ValidGoogleAuthCode()]
|
||||
]);
|
||||
|
||||
|
|
|
@ -26,10 +26,26 @@
|
|||
<li>{% trans %}tfa_google.step.download{% endtrans %}</li>
|
||||
<li>{% trans %}tfa_google.step.scan{% endtrans %}</li>
|
||||
<li>{% trans %}tfa_google.step.input_code{% endtrans %}</li>
|
||||
<li>{% trans %}tfa_google.step.download_backup{% endtrans %}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-3">
|
||||
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#manualSetupCollapse" aria-expanded="false" aria-controls="manualSetupCollapse">
|
||||
{% trans %}tfa_google.manual_setup{% endtrans %}
|
||||
</button>
|
||||
<div class="collapse" id="manualSetupCollapse">
|
||||
<div class="card card-body mb-2">
|
||||
<p><b>{% trans %}tfa_google.manual_setup.type</b>{% endtrans %}: TOTP</p>
|
||||
<p><b>{% trans %}tfa_google.manual_setup.username</b>{% endtrans %}: {{ tfa_google.username }}</p>
|
||||
<p><b>{% trans %}tfa_google.manual_setup.secret</b>{% endtrans %}: {{ tfa_google.secret }}</p>
|
||||
<p><b>{% trans %}tfa_google.manual_setup.digit_count</b>{% endtrans %}: 6</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_row(tfa_form.google_confirmation) }}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tfa-backup" role="tabpanel" aria-labelledby="backup-tab">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue