mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-09 00:11:30 +01:00
handle startAuthRequestLogin()
This commit is contained in:
parent
0cd840e6ae
commit
983cee8af6
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user