RED-5950 logout error on session expired
This commit is contained in:
parent
7f2d33f17b
commit
c91f923bfa
@ -58,13 +58,13 @@ export abstract class IqserUserService<
|
||||
}
|
||||
|
||||
async logout() {
|
||||
await this._cacheApiService.wipeCaches();
|
||||
if (await this._keycloakService.isLoggedIn()) {
|
||||
try {
|
||||
await this._keycloakService.loadUserProfile(true);
|
||||
await this._cacheApiService.wipeCaches();
|
||||
await this._keycloakService.logout();
|
||||
} catch (e) {
|
||||
await this.redirectToLogin();
|
||||
}
|
||||
window.location.href = this._keycloakService.getKeycloakInstance().createLoginUrl({
|
||||
redirectUri: window.location.origin + this._baseHref,
|
||||
});
|
||||
}
|
||||
|
||||
async redirectToLogin() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user