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() {
|
async logout() {
|
||||||
await this._cacheApiService.wipeCaches();
|
try {
|
||||||
if (await this._keycloakService.isLoggedIn()) {
|
await this._keycloakService.loadUserProfile(true);
|
||||||
|
await this._cacheApiService.wipeCaches();
|
||||||
await this._keycloakService.logout();
|
await this._keycloakService.logout();
|
||||||
|
} catch (e) {
|
||||||
|
await this.redirectToLogin();
|
||||||
}
|
}
|
||||||
window.location.href = this._keycloakService.getKeycloakInstance().createLoginUrl({
|
|
||||||
redirectUri: window.location.origin + this._baseHref,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async redirectToLogin() {
|
async redirectToLogin() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user