@open-rlb/ng-app 3.0.6 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$3 from '@angular/common/http';
|
|
2
2
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, Injectable, Inject, Optional, EventEmitter, importProvidersFrom, makeStateKey, makeEnvironmentProviders, Pipe, Input, Component, PLATFORM_ID, NgModule, Directive, inject, isDevMode } from '@angular/core';
|
|
4
|
+
import { InjectionToken, Injectable, Inject, Optional, EventEmitter, importProvidersFrom, makeStateKey, makeEnvironmentProviders, Pipe, Input, Component, PLATFORM_ID, NgModule, Directive, inject, APP_INITIALIZER, isDevMode } from '@angular/core';
|
|
5
5
|
import * as i2 from '@angular/router';
|
|
6
6
|
import { NavigationEnd, RoutesRecognized, RouterModule, Router, provideRouter } from '@angular/router';
|
|
7
7
|
import * as i1$4 from '@angular/service-worker';
|
|
@@ -1309,6 +1309,7 @@ class AuthenticationService {
|
|
|
1309
1309
|
// } else {
|
|
1310
1310
|
return this.oidc.checkAuthMultiple(url)
|
|
1311
1311
|
.pipe(tap(data => {
|
|
1312
|
+
this.logger.warn(`oidc checkAuthMultiple check, response: ${JSON.stringify(data)}; looking for at least one isAuthenticated`);
|
|
1312
1313
|
if (data.some(o => o.isAuthenticated)) {
|
|
1313
1314
|
const redirect = this.cookiesService.getCookie('loginRedirectUrl');
|
|
1314
1315
|
if (redirect) {
|
|
@@ -2848,10 +2849,10 @@ class AuthEffects {
|
|
|
2848
2849
|
return this.actions$.pipe(ofType(AuthActions.setCurrentProvider), map$1(({ currentProvider }) => AuthActionsInternal.setCurrentProvider({ currentProvider })));
|
|
2849
2850
|
});
|
|
2850
2851
|
this.logger = this.loggerService.for(this.constructor.name);
|
|
2851
|
-
this.logger.log(
|
|
2852
|
-
if (authConfig) {
|
|
2853
|
-
|
|
2854
|
-
}
|
|
2852
|
+
this.logger.log(`Initialized AuthEffects, auth config: ${authConfig}`);
|
|
2853
|
+
// if (authConfig) {
|
|
2854
|
+
// auth.checkAuthMultiple().subscribe();
|
|
2855
|
+
// }
|
|
2855
2856
|
}
|
|
2856
2857
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AuthEffects, deps: [{ token: i1$8.Actions }, { token: AuthenticationService }, { token: AppLoggerService }, { token: RLB_CFG_AUTH, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2857
2858
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AuthEffects }); }
|
|
@@ -2962,6 +2963,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2962
2963
|
}]
|
|
2963
2964
|
}] });
|
|
2964
2965
|
|
|
2966
|
+
function authInitializer(authService) {
|
|
2967
|
+
console.warn("authInitializer!!");
|
|
2968
|
+
return () => authService.checkAuthMultiple();
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2965
2971
|
const verifyDeactivate = (component, currentRoute, currentState, nextState) => {
|
|
2966
2972
|
return component.verifyDeactivate();
|
|
2967
2973
|
};
|
|
@@ -3007,6 +3013,12 @@ function provideRlbConfig(env) {
|
|
|
3007
3013
|
},
|
|
3008
3014
|
multi: true,
|
|
3009
3015
|
},
|
|
3016
|
+
{
|
|
3017
|
+
provide: APP_INITIALIZER,
|
|
3018
|
+
useFactory: authInitializer,
|
|
3019
|
+
deps: [AuthenticationService],
|
|
3020
|
+
multi: true
|
|
3021
|
+
},
|
|
3010
3022
|
];
|
|
3011
3023
|
}
|
|
3012
3024
|
function provideApp(app) {
|