Improve totp input field: disable autocorrect etc, add hints so browsers and password managers can find it

This commit is contained in:
Mark Felder 2020-07-15 17:58:07 -05:00
parent 1be7180214
commit e242684d1a
2 changed files with 17 additions and 3 deletions

View File

@ -16,9 +16,15 @@
{{ $t('login.authentication_code') }}
</label>
<input
id="code"
v-model="code"
autocomplete="one-time-code"
autocorrect="off"
autocapitalize="off"
class="form-control"
id="totp"
name="totp"
spellcheck="false"
type="text"
v-model="code"
>
</div>

View File

@ -97,8 +97,16 @@
<h4>{{ $t('general.verify') }}</h4>
<p>{{ $t('settings.mfa.verify.desc') }}</p>
<input
v-model="otpConfirmToken"
autocomplete="one-time-code"
autocorrect="off"
autocapitalize="off"
id="totp"
maxlength="6"
name="totp"
pattern="[0-9]*"
spellcheck="false"
type="text"
v-model="otpConfirmToken"
>
<p>{{ $t('settings.enter_current_password_to_confirm') }}:</p>