mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
Fix(login): [PM-20287] Initialize login email state when email is remembered
This commit is contained in:
@@ -536,6 +536,10 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|||||||
if (storedEmail) {
|
if (storedEmail) {
|
||||||
this.formGroup.controls.email.setValue(storedEmail);
|
this.formGroup.controls.email.setValue(storedEmail);
|
||||||
this.formGroup.controls.rememberEmail.setValue(true);
|
this.formGroup.controls.rememberEmail.setValue(true);
|
||||||
|
// If we load an email into the form, we need to initialize it for the login process as well
|
||||||
|
// so that other login components can use it.
|
||||||
|
// We do this here as it's possible that a user doesn't edit the email field before submitting.
|
||||||
|
this.loginEmailService.setLoginEmail(storedEmail);
|
||||||
} else {
|
} else {
|
||||||
this.formGroup.controls.rememberEmail.setValue(false);
|
this.formGroup.controls.rememberEmail.setValue(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user