mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
updated auth-cookie check
This commit is contained in:

committed by
Michael W Spalti

parent
290a89909e
commit
4c2a7a10c7
@@ -139,19 +139,18 @@ export class BrowserInitService extends InitService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When authenticated during the external authentication flow invalidate
|
* During the external authentication flow invalidates the SSR transferState
|
||||||
* the cache so the app is rehydrated with fresh data.
|
* data in the cache. This allows the app to fetch fresh content.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private externalAuthCheck() {
|
private externalAuthCheck() {
|
||||||
|
|
||||||
this.authenticationReady$().pipe(
|
this.authService.isExternalAuthentication().pipe(
|
||||||
switchMap(() => this.authService.isExternalAuthentication().pipe(
|
|
||||||
filter((externalAuth: boolean) => externalAuth)
|
filter((externalAuth: boolean) => externalAuth)
|
||||||
))
|
|
||||||
).subscribe(() => {
|
).subscribe(() => {
|
||||||
this.authService.setExternalAuthStatus(false);
|
// Clear the transferState data.
|
||||||
this.rootDatatService.invalidateRootCache();
|
this.rootDatatService.invalidateRootCache();
|
||||||
|
this.authService.setExternalAuthStatus(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user