@infrab4a/connect-angular 4.17.0-beta.7 → 4.17.0-beta.9
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.
|
@@ -3,7 +3,7 @@ import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angu
|
|
|
3
3
|
import * as i1$4 from '@angular/fire/app';
|
|
4
4
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
5
5
|
import * as i2 from '@angular/fire/app-check';
|
|
6
|
-
import { provideAppCheck,
|
|
6
|
+
import { provideAppCheck, ReCaptchaEnterpriseProvider, initializeAppCheck } from '@angular/fire/app-check';
|
|
7
7
|
import * as i3 from '@angular/fire/storage';
|
|
8
8
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
9
9
|
import * as i1$2 from '@infrab4a/connect';
|
|
@@ -2618,6 +2618,7 @@ class AngularConnectModule {
|
|
|
2618
2618
|
ngModule: AngularConnectModule,
|
|
2619
2619
|
providers: [
|
|
2620
2620
|
{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig },
|
|
2621
|
+
{ provide: RECAPTCHA_SITE_KEY, useValue: options.recaptchaSiteKey },
|
|
2621
2622
|
{
|
|
2622
2623
|
provide: CATEGORY_STRUCTURE,
|
|
2623
2624
|
useClass: isNil(options?.oldCategoryStructure) || options?.oldCategoryStructure
|
|
@@ -2632,9 +2633,6 @@ class AngularConnectModule {
|
|
|
2632
2633
|
...(isNil(options?.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
|
|
2633
2634
|
...(isNil(options?.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]),
|
|
2634
2635
|
...(isNil(options?.storageBaseUrl) ? [] : [{ provide: STORAGE_BASE_URL, useValue: options.storageBaseUrl }]),
|
|
2635
|
-
...(isNil(options?.recaptchaSiteKey)
|
|
2636
|
-
? []
|
|
2637
|
-
: [{ provide: RECAPTCHA_SITE_KEY, useValue: options.recaptchaSiteKey }]),
|
|
2638
2636
|
],
|
|
2639
2637
|
};
|
|
2640
2638
|
}
|
|
@@ -2690,8 +2688,10 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2690
2688
|
}),
|
|
2691
2689
|
provideAppCheck((injector) => {
|
|
2692
2690
|
const app = injector.get(FirebaseApp);
|
|
2691
|
+
console.log('Connect APP', app.name);
|
|
2693
2692
|
try {
|
|
2694
2693
|
const siteKey = injector.get(RECAPTCHA_SITE_KEY);
|
|
2694
|
+
console.log('RECAPTCHA_SITE_KEY', isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey));
|
|
2695
2695
|
return initializeAppCheck(app, {
|
|
2696
2696
|
provider: isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey),
|
|
2697
2697
|
isTokenAutoRefreshEnabled: true,
|
|
@@ -2700,17 +2700,7 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2700
2700
|
catch (error) {
|
|
2701
2701
|
if (error instanceof Error)
|
|
2702
2702
|
console.error(error.message);
|
|
2703
|
-
|
|
2704
|
-
return initializeAppCheck(app, {
|
|
2705
|
-
provider: undefined,
|
|
2706
|
-
isTokenAutoRefreshEnabled: true,
|
|
2707
|
-
});
|
|
2708
|
-
}
|
|
2709
|
-
catch (error2) {
|
|
2710
|
-
console.warn('ReCAPTCHA site key not provided or invalid, App Check not initialized');
|
|
2711
|
-
if (error2 instanceof Error)
|
|
2712
|
-
console.error(error2.message);
|
|
2713
|
-
}
|
|
2703
|
+
return;
|
|
2714
2704
|
}
|
|
2715
2705
|
}),
|
|
2716
2706
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|
|
@@ -2738,8 +2728,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2738
2728
|
}),
|
|
2739
2729
|
provideAppCheck((injector) => {
|
|
2740
2730
|
const app = injector.get(FirebaseApp);
|
|
2731
|
+
console.log('Connect APP', app.name);
|
|
2741
2732
|
try {
|
|
2742
2733
|
const siteKey = injector.get(RECAPTCHA_SITE_KEY);
|
|
2734
|
+
console.log('RECAPTCHA_SITE_KEY', isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey));
|
|
2743
2735
|
return initializeAppCheck(app, {
|
|
2744
2736
|
provider: isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey),
|
|
2745
2737
|
isTokenAutoRefreshEnabled: true,
|
|
@@ -2748,17 +2740,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2748
2740
|
catch (error) {
|
|
2749
2741
|
if (error instanceof Error)
|
|
2750
2742
|
console.error(error.message);
|
|
2751
|
-
|
|
2752
|
-
return initializeAppCheck(app, {
|
|
2753
|
-
provider: undefined,
|
|
2754
|
-
isTokenAutoRefreshEnabled: true,
|
|
2755
|
-
});
|
|
2756
|
-
}
|
|
2757
|
-
catch (error2) {
|
|
2758
|
-
console.warn('ReCAPTCHA site key not provided or invalid, App Check not initialized');
|
|
2759
|
-
if (error2 instanceof Error)
|
|
2760
|
-
console.error(error2.message);
|
|
2761
|
-
}
|
|
2743
|
+
return;
|
|
2762
2744
|
}
|
|
2763
2745
|
}),
|
|
2764
2746
|
provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
|