mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-10 00:21:27 +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;
|
showPassword = false;
|
||||||
formPromise: Promise<AuthResult>;
|
formPromise: Promise<AuthResult>;
|
||||||
|
|
||||||
onSuccessfulLogin: () => Promise<any>;
|
onSuccessfulLogin: () => Promise<any>;
|
||||||
onSuccessfulLoginNavigate: (userId: UserId) => Promise<any>;
|
onSuccessfulLoginNavigate: (userId: UserId) => Promise<any>;
|
||||||
onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;
|
onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;
|
||||||
onSuccessfulLoginForceResetNavigate: () => Promise<any>;
|
onSuccessfulLoginForceResetNavigate: () => Promise<any>;
|
||||||
|
|
||||||
showLoginWithDevice: boolean;
|
showLoginWithDevice: boolean;
|
||||||
validatedEmail = false;
|
validatedEmail = false;
|
||||||
paramEmailSet = false;
|
paramEmailSet = false;
|
||||||
|
@ -181,6 +181,18 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
|||||||
return true;
|
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> {
|
protected async validateEmail(): Promise<void> {
|
||||||
this.formGroup.controls.email.markAsTouched();
|
this.formGroup.controls.email.markAsTouched();
|
||||||
const emailValid = this.formGroup.controls.email.valid;
|
const emailValid = this.formGroup.controls.email.valid;
|
||||||
|
Loading…
Reference in New Issue
Block a user