mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Ensure logout link still redirects to login page after session time-out
Refs #653
This commit is contained in:
parent
ce9d2d96c6
commit
e394f874b2
@ -75,7 +75,16 @@ export class AppComponent {
|
||||
event.preventDefault();
|
||||
this.auth.logout()
|
||||
.subscribe(
|
||||
() => this.router.navigate(['/login'])
|
||||
() => {
|
||||
this.router.navigate(['/login']);
|
||||
},
|
||||
($event: any) => {
|
||||
if ($event && $event.response && $event.response.status === 401) {
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
console.error('An unknown error occurred while logging out', $event);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user