[WIP] 2fa

* Don't allow per get request to disable 2fa
* Fix google recaptcha issue
* Fix rec key check
* Make input auth code required + autofocus
This commit is contained in:
slawkens
2026-01-31 20:44:26 +01:00
parent 381d5bb884
commit 7471c49793
13 changed files with 86 additions and 75 deletions

View File

@@ -17,14 +17,13 @@
>
{{ csrf() }}
{% set button_name = 'Resend Email Code' %}
{% set button_name = 'Resend E-Mail Code' %}
{{ include('buttons.base.html.twig') }}
</form>
</div>
An <b>email code</b> has already been sent to the email address assigned to your account.
Please check your email account's spam/junk filter and make sure that your mailbox is not
full.<br>In case you need a new email code, you can request one by clicking on "Resend Email
Code".
An <b>E-Mail code</b> has already been sent to the E-Mail address assigned to your account.
Please check your E-Mail account's spam/junk filter and make sure that your mailbox is not
full.<br>In case you need a new E-Mail code, you can request one by clicking on "Resend E-Mail Code".
</td>
</tr>
</tbody>
@@ -38,15 +37,15 @@
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
<tbody>
<tr>
<td><b>Email code authentication is enabled for your account.</b><br><br>Please enter the <b>most
recent email code</b> you have received in order to log in.<br>
<td><b>E-Mail code authentication is enabled for your account.</b><br><br>Please enter the <b>most
recent E-Mail code</b> you have received in order to log in.<br>
<div style="margin-top: 15px; margin-bottom: 15px;">
<div class="LabelV150 {{ wrongCode ? 'red' : '' }}" style="float:left;"><label for="email-code">Email Code:</label></div>
<input form="form" id="auth-code" name="auth-code" maxlength="15" autocomplete="off">
<div class="LabelV150 {{ wrongCode ? 'red' : '' }}" style="float:left;"><label for="email-code">E-Mail Code:</label></div>
<input form="form" id="auth-code" name="auth-code" maxlength="15" autocomplete="off" required autofocus>
{% if wrongCode %}
<br/>
<div class="LabelV150" style="float:left;">&nbsp; </div>
<div class="FormFieldError">Invalid email code!</div>
<div class="FormFieldError">Invalid E-Mail code!</div>
{% endif %}
</div>
</td>