@edgedev/firebase 1.9.8 → 1.9.10

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.
Files changed (2) hide show
  1. package/edgeFirebase.ts +8 -4
  2. package/package.json +1 -1
package/edgeFirebase.ts CHANGED
@@ -195,7 +195,8 @@ export const EdgeFirebase = class {
195
195
  emulatorFirestore: "",
196
196
  emulatorFunctions: ""
197
197
  },
198
- isPersistant: false
198
+ isPersistant: false,
199
+ enablePopupRedirect: false,
199
200
  ) {
200
201
  this.firebaseConfig = firebaseConfig;
201
202
  this.app = initializeApp(this.firebaseConfig);
@@ -203,8 +204,11 @@ export const EdgeFirebase = class {
203
204
  if (isPersistant) {
204
205
  persistence = browserLocalPersistence;
205
206
  }
206
-
207
- this.auth = initializeAuth(this.app, { persistence, popupRedirectResolver: browserPopupRedirectResolver });
207
+ if (enablePopupRedirect) {
208
+ this.auth = initializeAuth(this.app, { persistence, popupRedirectResolver: browserPopupRedirectResolver });
209
+ } else {
210
+ this.auth = initializeAuth(this.app, { persistence });
211
+ }
208
212
  if (this.firebaseConfig.emulatorAuth) {
209
213
  connectAuthEmulator(this.auth, `http://localhost:${this.firebaseConfig.emulatorAuth}`)
210
214
  }
@@ -1371,7 +1375,7 @@ export const EdgeFirebase = class {
1371
1375
  }));
1372
1376
  } else { // reject if no items fetched
1373
1377
  firstRun = false;
1374
- reject(this.sendResponse({
1378
+ resolve(this.sendResponse({
1375
1379
  success: false,
1376
1380
  message: `No data found in "${collectionPath}"`,
1377
1381
  meta: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/firebase",
3
- "version": "1.9.8",
3
+ "version": "1.9.10",
4
4
  "description": "Vue 3 / Nuxt 3 Plugin or Nuxt 3 plugin for firebase authentication and firestore.",
5
5
  "main": "index.ts",
6
6
  "scripts": {