diff --git a/apps/web/src/app/components/user-verification/user-verification.component.html b/apps/web/src/app/components/user-verification/user-verification.component.html index b90c6074d8..b0b4a543cd 100644 --- a/apps/web/src/app/components/user-verification/user-verification.component.html +++ b/apps/web/src/app/components/user-verification/user-verification.component.html @@ -1,46 +1,41 @@ - - - {{ "confirmIdentity" | i18n }} + + {{ "masterPass" | i18n }} + + {{ "confirmIdentity" | i18n }} + -
- - - + {{ "codeSent" | i18n }}
-
- + + {{ "verificationCode" | i18n }} - {{ "confirmIdentity" | i18n }} -
+ {{ "confirmIdentity" | i18n }} +
diff --git a/libs/angular/src/auth/components/user-verification.component.ts b/libs/angular/src/auth/components/user-verification.component.ts index ea514e177c..63ddd0e9bc 100644 --- a/libs/angular/src/auth/components/user-verification.component.ts +++ b/libs/angular/src/auth/components/user-verification.component.ts @@ -1,5 +1,5 @@ import { Directive, OnInit } from "@angular/core"; -import { ControlValueAccessor, FormControl } from "@angular/forms"; +import { ControlValueAccessor, FormControl, Validators } from "@angular/forms"; import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification/userVerification.service.abstraction"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; @@ -22,7 +22,7 @@ export class UserVerificationComponent implements ControlValueAccessor, OnInit { disableRequestOTP = false; sentCode = false; - secret = new FormControl(""); + secret = new FormControl("", [Validators.required]); private onChange: (value: Verification) => void; @@ -39,7 +39,7 @@ export class UserVerificationComponent implements ControlValueAccessor, OnInit { this.secret.valueChanges.subscribe((secret: string) => this.processChanges(secret)); } - async requestOTP() { + requestOTP = async () => { if (this.usesKeyConnector) { this.disableRequestOTP = true; try { @@ -49,7 +49,7 @@ export class UserVerificationComponent implements ControlValueAccessor, OnInit { this.disableRequestOTP = false; } } - } + }; writeValue(obj: any): void { this.secret.setValue(obj);