diff --git a/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts b/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts index d14cf7a6..bd099cd9 100644 --- a/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts +++ b/projects/ucap-webmessenger-app/src/app/guards/auto-login.guard.ts @@ -46,7 +46,11 @@ export class AppAutoLoginGuard implements CanActivate { 'PERSON_LOGOUT' ); - if (!!appUserInfo && appUserInfo.autoLogin && !personLogout) { + if ( + !!appUserInfo && + appUserInfo.settings.general.autoLogin && + !personLogout + ) { this.store.dispatch( AuthenticationStore.webLogin({ loginInfo: { @@ -56,7 +60,7 @@ export class AppAutoLoginGuard implements CanActivate { loginPw: appUserInfo.loginPw }, rememberMe: appUserInfo.rememberMe, - autoLogin: appUserInfo.autoLogin + autoLogin: true }) ); resolve(false); diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html index 326a4876..b49e4b82 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html @@ -9,7 +9,7 @@ [companyCode]="appUserInfo?.companyCode" [loginId]="appUserInfo?.loginId" [rememberMe]="appUserInfo?.rememberMe" - [autoLogin]="appUserInfo?.autoLogin" + [autoLogin]="appUserInfo?.settings?.general?.autoLogin" [useRememberMe]="useRememberMe" [useAutoLogin]="useAutoLogin" (login)="onLogin($event)" diff --git a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts index 7e0fb29c..bfecc867 100644 --- a/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/authentication.service.ts @@ -74,9 +74,9 @@ export class AppAuthenticationService { if (rememberMe || autoLogin) { appUserInfo = { ...appUserInfo, - rememberMe, - autoLogin + rememberMe }; + appUserInfo.settings.general.autoLogin = autoLogin; } this.localStorageService.encSet( diff --git a/projects/ucap-webmessenger-app/src/app/types/app-user-info.type.ts b/projects/ucap-webmessenger-app/src/app/types/app-user-info.type.ts index 622f8c67..16be3b5c 100644 --- a/projects/ucap-webmessenger-app/src/app/types/app-user-info.type.ts +++ b/projects/ucap-webmessenger-app/src/app/types/app-user-info.type.ts @@ -7,7 +7,6 @@ export interface AppUserInfo { loginId?: string; loginPw?: string; rememberMe?: boolean; - autoLogin?: boolean; companyCode?: string; companyGroupType?: string; localeCode?: LocaleCode;