mirror of
https://github.com/bitwarden/browser
synced 2026-02-02 09:43:29 +00:00
Implements better error handling when a user enters an invalid 2FA recovery code. Upon entering an invalid code: - Keep the user on the `/recover-2fa` page (This also makes it so the incorrect code remains in the form field so the user can see what they entered, if they mistyped the code, etc.) - Show an inline error: "Invalid recovery code"
40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
|
<p bitTypography="body1">
|
|
{{ recoveryCodeMessage }}
|
|
<a
|
|
bitLink
|
|
href="https://bitwarden.com/help/lost-two-step-device/"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>{{ "learnMore" | i18n }}</a
|
|
>
|
|
</p>
|
|
<bit-form-field>
|
|
<bit-label>{{ "emailAddress" | i18n }}</bit-label>
|
|
<input
|
|
bitInput
|
|
type="text"
|
|
formControlName="email"
|
|
appAutofocus
|
|
inputmode="email"
|
|
appInputVerbatim="false"
|
|
/>
|
|
</bit-form-field>
|
|
<bit-form-field>
|
|
<bit-label>{{ "masterPass" | i18n }}</bit-label>
|
|
<input bitInput type="password" formControlName="masterPassword" appInputVerbatim />
|
|
</bit-form-field>
|
|
<bit-form-field>
|
|
<bit-label>{{ "recoveryCodeTitle" | i18n }}</bit-label>
|
|
<input bitInput type="text" formControlName="recoveryCode" appInputVerbatim />
|
|
</bit-form-field>
|
|
<div class="tw-flex tw-gap-2">
|
|
<button type="submit" bitButton bitFormButton buttonType="primary" [block]="true">
|
|
{{ "submit" | i18n }}
|
|
</button>
|
|
<a bitButton buttonType="secondary" routerLink="/login" [block]="true">
|
|
{{ "cancel" | i18n }}
|
|
</a>
|
|
</div>
|
|
</form>
|