diff --git a/src/app/_services/auth.service.ts b/src/app/_services/auth.service.ts index 30d6d05..ba4651a 100644 --- a/src/app/_services/auth.service.ts +++ b/src/app/_services/auth.service.ts @@ -47,7 +47,7 @@ export class AuthService { throw new Error('login rejected'); } this.sessionLoginCount++; - this.setState('Click button to perform login ' + this.sessionLoginCount + ' with token ' + this.sessionToken); + this.setState('Click button to log in'); return; }); xhr.send(); @@ -67,7 +67,7 @@ export class AuthService { this.sessionToken = xhr.getResponseHeader('Token'); sessionStorage.setItem(btoa('CICADA_SESSION_TOKEN'), this.sessionToken); this.sessionLoginCount++; - this.setState('Click button to perform login ' + this.sessionLoginCount + ' with token ' + this.sessionToken); + this.setState('Click button to log in'); return; }); xhr.send(); @@ -147,6 +147,7 @@ export class AuthService { logout(): void { sessionStorage.removeItem(btoa('CICADA_SESSION_TOKEN')); + this.sessionToken = undefined; window.location.reload(true); } diff --git a/src/app/auth/auth.component.ts b/src/app/auth/auth.component.ts index cc06dd3..5f7264a 100644 --- a/src/app/auth/auth.component.ts +++ b/src/app/auth/auth.component.ts @@ -29,8 +29,7 @@ export class AuthComponent implements OnInit { if (this.authService.privateKey !== undefined) { const setKey = await this.authService.setKey(this.authService.privateKey); if (setKey && this.authService.sessionToken !== undefined) { - this.authService.setState( - 'Click button to perform login ' + this.authService.sessionLoginCount + ' with token ' + this.authService.sessionToken); + this.authService.setState('Click button to log in'); } } } diff --git a/src/app/pages/settings/settings.component.html b/src/app/pages/settings/settings.component.html index dec3a0a..9ed5869 100644 --- a/src/app/pages/settings/settings.component.html +++ b/src/app/pages/settings/settings.component.html @@ -50,7 +50,7 @@