Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed page and admin menu for Shibboleth auth #3011

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/modules/app/browser-init.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ import { AppState } from '../../app/app.reducer';
import { BreadcrumbsService } from '../../app/breadcrumbs/breadcrumbs.service';
import { AuthService } from '../../app/core/auth/auth.service';
import { coreSelector } from '../../app/core/core.selectors';
import { RequestService } from '../../app/core/data/request.service';
import { RootDataService } from '../../app/core/data/root-data.service';
import { LocaleService } from '../../app/core/locale/locale.service';
import { HeadTagService } from '../../app/core/metadata/head-tag.service';
import { HALEndpointService } from '../../app/core/shared/hal-endpoint.service';
import { CorrelationIdService } from '../../app/correlation-id/correlation-id.service';
import { InitService } from '../../app/init.service';
import { KlaroService } from '../../app/shared/cookies/klaro.service';
Expand Down Expand Up @@ -81,6 +83,9 @@ export class BrowserInitService extends InitService {
protected menuService: MenuService,
private rootDataService: RootDataService,
protected router: Router,
private requestService: RequestService,
private halService: HALEndpointService,

) {
super(
store,
Expand Down Expand Up @@ -169,17 +174,15 @@ export class BrowserInitService extends InitService {
}

/**
* During an external authentication flow invalidate the SSR transferState
* During an external authentication flow invalidate the
* data in the cache. This allows the app to fetch fresh content.
* @private
*/
private externalAuthCheck() {

this.sub = this.authService.isExternalAuthentication().pipe(
filter((externalAuth: boolean) => externalAuth),
).subscribe(() => {
// Clear the transferState data.
this.rootDataService.invalidateRootCache();
this.requestService.setStaleByHrefSubstring(this.halService.getRootHref());
this.authService.setExternalAuthStatus(false);
},
);
Expand Down
Loading