Merge pull request #5355 from FinnStutzenstein/SamlInfitySpinnerFix
fixed endless spinner on SAML login
This commit is contained in:
commit
ea830f53b0
@ -56,6 +56,9 @@ export class AuthService {
|
|||||||
await this.OpenSlides.afterLoginBootup(response.user_id);
|
await this.OpenSlides.afterLoginBootup(response.user_id);
|
||||||
await this.redirectUser(response.user_id);
|
await this.redirectUser(response.user_id);
|
||||||
} else if (authType === 'saml') {
|
} 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
|
window.location.href = environment.urlPrefix + '/saml/?sso'; // Bye
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unsupported auth type "${authType}"`);
|
throw new Error(`Unsupported auth type "${authType}"`);
|
||||||
@ -67,7 +70,7 @@ export class AuthService {
|
|||||||
* if it wasn't done before.
|
* if it wasn't done before.
|
||||||
*/
|
*/
|
||||||
public async redirectUser(userId: number): Promise<void> {
|
public async redirectUser(userId: number): Promise<void> {
|
||||||
if (!this.OpenSlides.booted) {
|
if (!this.OpenSlides.isBooted) {
|
||||||
await this.OpenSlides.afterLoginBootup(userId);
|
await this.OpenSlides.afterLoginBootup(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +252,10 @@ export class OperatorService implements OnAfterAppsLoaded {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async clearWhoAmIFromStorage(): Promise<void> {
|
||||||
|
await this.storageService.remove(WHOAMI_STORAGE_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the operator user. Will be saved to storage
|
* Sets the operator user. Will be saved to storage
|
||||||
* @param user The new operator.
|
* @param user The new operator.
|
||||||
|
Loading…
Reference in New Issue
Block a user