Skip to content

Commit

Permalink
Updated browser init to work again with Shibboleth auth
Browse files Browse the repository at this point in the history
lint fix
  • Loading branch information
mspalti committed May 5, 2024
1 parent c94be6b commit e81bd69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Binary file added .yarn/install-state.gz
Binary file not shown.
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 @@ -55,6 +55,8 @@ import {
import { extendEnvironmentWithAppConfig } from '../../config/config.util';
import { DefaultAppConfig } from '../../config/default-app-config';
import { environment } from '../../environments/environment';
import { RequestService } from "../../app/core/data/request.service";

Check failure on line 58 in src/modules/app/browser-init.service.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 58 in src/modules/app/browser-init.service.ts

View workflow job for this annotation

GitHub Actions / tests (20.x)

Strings must use singlequote
import { HALEndpointService } from "../../app/core/shared/hal-endpoint.service";

Check failure on line 59 in src/modules/app/browser-init.service.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 59 in src/modules/app/browser-init.service.ts

View workflow job for this annotation

GitHub Actions / tests (20.x)

Strings must use singlequote

/**
* Performs client-side initialization.
Expand All @@ -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

0 comments on commit e81bd69

Please sign in to comment.