From d27ef74fe18e275958c4db3e430682edcc7141b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Gon=C3=A7alves?= Date: Thu, 9 Feb 2023 21:53:05 +0000 Subject: [PATCH] SG-1047 Fix remember me on web (#4706) --- .../src/auth/components/login-with-device.component.ts | 2 +- libs/angular/src/auth/components/login.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/angular/src/auth/components/login-with-device.component.ts b/libs/angular/src/auth/components/login-with-device.component.ts index d8569212d2..14b23aa1da 100644 --- a/libs/angular/src/auth/components/login-with-device.component.ts +++ b/libs/angular/src/auth/components/login-with-device.component.ts @@ -67,7 +67,7 @@ export class LoginWithDeviceComponent const navigation = this.router.getCurrentNavigation(); if (navigation) { - this.email = navigation.extras?.state?.email; + this.email = this.loginService.getEmail(); } //gets signalR push notification diff --git a/libs/angular/src/auth/components/login.component.ts b/libs/angular/src/auth/components/login.component.ts index 3f662d89b9..1721028777 100644 --- a/libs/angular/src/auth/components/login.component.ts +++ b/libs/angular/src/auth/components/login.component.ts @@ -184,8 +184,8 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit return; } - const email = this.formGroup.get("email").value; - this.router.navigate(["/login-with-device"], { state: { email: email } }); + this.setFormValues(); + this.router.navigate(["/login-with-device"]); } async launchSsoBrowser(clientId: string, ssoRedirectUri: string) {