1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-09 00:11:30 +01:00

handle startAuthRequestLogin()

This commit is contained in:
rr-bw 2024-08-31 14:17:09 -07:00
parent 0cd840e6ae
commit 983cee8af6
No known key found for this signature in database
GPG Key ID: 3FA13C3ADEE51D5D
2 changed files with 14 additions and 0 deletions

View File

@ -40,10 +40,12 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit,
showPassword = false;
formPromise: Promise<AuthResult>;
onSuccessfulLogin: () => Promise<any>;
onSuccessfulLoginNavigate: (userId: UserId) => Promise<any>;
onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;
onSuccessfulLoginForceResetNavigate: () => Promise<any>;
showLoginWithDevice: boolean;
validatedEmail = false;
paramEmailSet = false;

View File

@ -181,6 +181,18 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
return true;
}
protected async startAuthRequestLogin() {
this.formGroup.get("masterPassword")?.clearValidators();
this.formGroup.get("masterPassword")?.updateValueAndValidity();
if (!this.formGroup.valid) {
return;
}
await this.saveEmailSettings();
await this.router.navigate(["/login-with-device"]);
}
protected async validateEmail(): Promise<void> {
this.formGroup.controls.email.markAsTouched();
const emailValid = this.formGroup.controls.email.valid;