@infrab4a/connect-angular 4.17.0-beta.11 → 4.17.0-beta.13
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.
- package/esm2020/angular-connect.module.mjs +11 -9
- package/esm2020/angular-firebase-auth.module.mjs +32 -4
- package/fesm2015/infrab4a-connect-angular.mjs +41 -11
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +41 -11
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
|
9
9
|
import * as i1$2 from '@infrab4a/connect';
|
|
10
10
|
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductsVertexSearch, VertexAxiosAdapter, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, OrderStatus, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, isEmpty, Category, PersonTypes, WishlistLogType, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
|
|
11
11
|
import * as i1 from '@angular/fire/auth';
|
|
12
|
-
import { Auth, provideAuth, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
12
|
+
import { Auth, provideAuth, initializeAuth, indexedDBLocalPersistence, browserLocalPersistence, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
13
13
|
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
14
14
|
import * as i1$1 from '@angular/fire/firestore';
|
|
15
15
|
import { Firestore, provideFirestore, initializeFirestore, memoryLocalCache, docSnapshots, doc } from '@angular/fire/firestore';
|
|
@@ -124,11 +124,39 @@ AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
|
|
|
124
124
|
},
|
|
125
125
|
deps: ['AuthenticationService'],
|
|
126
126
|
},
|
|
127
|
-
], imports: [provideAuth((injector) =>
|
|
127
|
+
], imports: [provideAuth((injector) => {
|
|
128
|
+
const app = injector.get(FirebaseApp);
|
|
129
|
+
try {
|
|
130
|
+
console.log('Initializing auth', app.name);
|
|
131
|
+
return initializeAuth(app, {
|
|
132
|
+
persistence: [indexedDBLocalPersistence, browserLocalPersistence],
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
if (error instanceof Error)
|
|
137
|
+
console.error('Error initializing auth', error.message);
|
|
138
|
+
return getAuth(app);
|
|
139
|
+
}
|
|
140
|
+
})] });
|
|
128
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
129
142
|
type: NgModule,
|
|
130
143
|
args: [{
|
|
131
|
-
imports: [
|
|
144
|
+
imports: [
|
|
145
|
+
provideAuth((injector) => {
|
|
146
|
+
const app = injector.get(FirebaseApp);
|
|
147
|
+
try {
|
|
148
|
+
console.log('Initializing auth', app.name);
|
|
149
|
+
return initializeAuth(app, {
|
|
150
|
+
persistence: [indexedDBLocalPersistence, browserLocalPersistence],
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
if (error instanceof Error)
|
|
155
|
+
console.error('Error initializing auth', error.message);
|
|
156
|
+
return getAuth(app);
|
|
157
|
+
}
|
|
158
|
+
}),
|
|
159
|
+
],
|
|
132
160
|
providers: [
|
|
133
161
|
{
|
|
134
162
|
provide: 'Authentication',
|
|
@@ -2695,10 +2723,11 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2695
2723
|
try {
|
|
2696
2724
|
const provider = injector.get(APP_CHECK_PROVIDER);
|
|
2697
2725
|
console.log('APP_CHECK_PROVIDER', provider);
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2726
|
+
if (provider)
|
|
2727
|
+
return initializeAppCheck(app, {
|
|
2728
|
+
provider,
|
|
2729
|
+
isTokenAutoRefreshEnabled: true,
|
|
2730
|
+
});
|
|
2702
2731
|
}
|
|
2703
2732
|
catch (error) {
|
|
2704
2733
|
if (error instanceof Error)
|
|
@@ -2738,10 +2767,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2738
2767
|
try {
|
|
2739
2768
|
const provider = injector.get(APP_CHECK_PROVIDER);
|
|
2740
2769
|
console.log('APP_CHECK_PROVIDER', provider);
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2770
|
+
if (provider)
|
|
2771
|
+
return initializeAppCheck(app, {
|
|
2772
|
+
provider,
|
|
2773
|
+
isTokenAutoRefreshEnabled: true,
|
|
2774
|
+
});
|
|
2745
2775
|
}
|
|
2746
2776
|
catch (error) {
|
|
2747
2777
|
if (error instanceof Error)
|