fixed endless spinner on SAML login
This commit is contained in:
parent
1e2395c1e6
commit
c643a233ae
@ -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<void> {
|
||||
if (!this.OpenSlides.booted) {
|
||||
if (!this.OpenSlides.isBooted) {
|
||||
await this.OpenSlides.afterLoginBootup(userId);
|
||||
}
|
||||
|
||||
|
@ -252,6 +252,10 @@ export class OperatorService implements OnAfterAppsLoaded {
|
||||
return response;
|
||||
}
|
||||
|
||||
public async clearWhoAmIFromStorage(): Promise<void> {
|
||||
await this.storageService.remove(WHOAMI_STORAGE_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the operator user. Will be saved to storage
|
||||
* @param user The new operator.
|
||||
|
Loading…
Reference in New Issue
Block a user