diff --git a/client/src/app/core/core-services/auth.service.ts b/client/src/app/core/core-services/auth.service.ts index b85e44fad..4a8691d39 100644 --- a/client/src/app/core/core-services/auth.service.ts +++ b/client/src/app/core/core-services/auth.service.ts @@ -56,6 +56,9 @@ export class AuthService { await this.OpenSlides.afterLoginBootup(response.user_id); await this.redirectUser(response.user_id); } else if (authType === 'saml') { + await this.operator.clearWhoAmIFromStorage(); // This is important: + // Then returning to the page, we do not want to have anything cached so a + // fresh whoami is executed. window.location.href = environment.urlPrefix + '/saml/?sso'; // Bye } else { throw new Error(`Unsupported auth type "${authType}"`); @@ -67,7 +70,7 @@ export class AuthService { * if it wasn't done before. */ public async redirectUser(userId: number): Promise { - if (!this.OpenSlides.booted) { + if (!this.OpenSlides.isBooted) { await this.OpenSlides.afterLoginBootup(userId); } diff --git a/client/src/app/core/core-services/operator.service.ts b/client/src/app/core/core-services/operator.service.ts index 699884f89..7d6b407aa 100644 --- a/client/src/app/core/core-services/operator.service.ts +++ b/client/src/app/core/core-services/operator.service.ts @@ -252,6 +252,10 @@ export class OperatorService implements OnAfterAppsLoaded { return response; } + public async clearWhoAmIFromStorage(): Promise { + await this.storageService.remove(WHOAMI_STORAGE_KEY); + } + /** * Sets the operator user. Will be saved to storage * @param user The new operator.