@@ -32,9 +32,11 @@ import { AppState } from '../../app/app.reducer';
3232import { BreadcrumbsService } from '../../app/breadcrumbs/breadcrumbs.service' ;
3333import { AuthService } from '../../app/core/auth/auth.service' ;
3434import { coreSelector } from '../../app/core/core.selectors' ;
35+ import { RequestService } from '../../app/core/data/request.service' ;
3536import { RootDataService } from '../../app/core/data/root-data.service' ;
3637import { LocaleService } from '../../app/core/locale/locale.service' ;
3738import { HeadTagService } from '../../app/core/metadata/head-tag.service' ;
39+ import { HALEndpointService } from '../../app/core/shared/hal-endpoint.service' ;
3840import { CorrelationIdService } from '../../app/correlation-id/correlation-id.service' ;
3941import { InitService } from '../../app/init.service' ;
4042import { KlaroService } from '../../app/shared/cookies/klaro.service' ;
@@ -81,6 +83,9 @@ export class BrowserInitService extends InitService {
8183 protected menuService : MenuService ,
8284 private rootDataService : RootDataService ,
8385 protected router : Router ,
86+ private requestService : RequestService ,
87+ private halService : HALEndpointService ,
88+
8489 ) {
8590 super (
8691 store ,
@@ -169,17 +174,15 @@ export class BrowserInitService extends InitService {
169174 }
170175
171176 /**
172- * During an external authentication flow invalidate the SSR transferState
177+ * During an external authentication flow invalidate the
173178 * data in the cache. This allows the app to fetch fresh content.
174179 * @private
175180 */
176181 private externalAuthCheck ( ) {
177-
178182 this . sub = this . authService . isExternalAuthentication ( ) . pipe (
179183 filter ( ( externalAuth : boolean ) => externalAuth ) ,
180184 ) . subscribe ( ( ) => {
181- // Clear the transferState data.
182- this . rootDataService . invalidateRootCache ( ) ;
185+ this . requestService . setStaleByHrefSubstring ( this . halService . getRootHref ( ) ) ;
183186 this . authService . setExternalAuthStatus ( false ) ;
184187 } ,
185188 ) ;
0 commit comments