This commit is contained in:
Dan Percic 2023-01-10 15:36:13 +02:00
parent 46b630de82
commit b60331ca08

View File

@ -59,7 +59,7 @@ export abstract class IqserUserService<
async logout() {
await this._cacheApiService.wipeCaches();
if(await this._keycloakService.isLoggedIn()) {
if (await this._keycloakService.isLoggedIn()) {
await this._keycloakService.logout();
}
window.location.href = this._keycloakService.getKeycloakInstance().createLoginUrl({
@ -67,7 +67,7 @@ export abstract class IqserUserService<
});
}
async redirectToLogin(){
async redirectToLogin() {
await this._cacheApiService.wipeCaches();
window.location.href = this._keycloakService.getKeycloakInstance().createLoginUrl({
redirectUri: window.location.origin + this._baseHref,
@ -89,7 +89,7 @@ export abstract class IqserUserService<
throw new Error('No user id');
}
} catch (e) {
console.log("Load KC profile failed");
console.log('Load KC profile failed');
await this.redirectToLogin();
return;
}