mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +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
|
||||
* the cache so the app is rehydrated with fresh data.
|
||||
* During the external authentication flow invalidates the SSR transferState
|
||||
* data in the cache. This allows the app to fetch fresh content.
|
||||
* @private
|
||||
*/
|
||||
private externalAuthCheck() {
|
||||
|
||||
this.authenticationReady$().pipe(
|
||||
switchMap(() => this.authService.isExternalAuthentication().pipe(
|
||||
this.authService.isExternalAuthentication().pipe(
|
||||
filter((externalAuth: boolean) => externalAuth)
|
||||
))
|
||||
).subscribe(() => {
|
||||
this.authService.setExternalAuthStatus(false);
|
||||
// Clear the transferState data.
|
||||
this.rootDatatService.invalidateRootCache();
|
||||
this.authService.setExternalAuthStatus(false);
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user