From 5601a5d63ec12af493f8eef4c9da359e1b0c7e8a Mon Sep 17 00:00:00 2001 From: Michael Breu <Michael.Breu@arctis.at> Date: Thu, 7 Jul 2022 11:05:57 +0200 Subject: [PATCH] Fixing Problems with empty remember status --- src/main/webapp/app/core/auth/auth-jwt.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/core/auth/auth-jwt.service.ts b/src/main/webapp/app/core/auth/auth-jwt.service.ts index 1696a5531..1684ed785 100644 --- a/src/main/webapp/app/core/auth/auth-jwt.service.ts +++ b/src/main/webapp/app/core/auth/auth-jwt.service.ts @@ -50,8 +50,12 @@ export class AuthServerProvider { saveRememberMe(rememberMe: boolean): void { this.localStorageService.store('rememberMe', rememberMe); } + getRememberMe(): boolean { - return this.localStorageService.retrieve('rememberMe') as boolean; + const remember = this.localStorageService.retrieve('rememberMe'); + if (!remember) + return false; + return remember as boolean; } private authenticateSuccess(response: JwtToken, rememberMe: boolean): void { -- GitLab