@firebase/auth 0.20.5-canary.fcd4b8ac3 → 0.20.6

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 (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cordova/index.js +2 -2
  3. package/dist/cordova/internal.js +4 -3
  4. package/dist/cordova/internal.js.map +1 -1
  5. package/dist/cordova/{popup_redirect-d24b97e0.js → popup_redirect-a23784e6.js} +41 -31
  6. package/dist/cordova/popup_redirect-a23784e6.js.map +1 -0
  7. package/dist/esm2017/{index-107c191e.js → index-6bd8d405.js} +31 -22
  8. package/dist/esm2017/index-6bd8d405.js.map +1 -0
  9. package/dist/esm2017/index.js +1 -1
  10. package/dist/esm2017/internal.js +2 -2
  11. package/dist/esm2017/internal.js.map +1 -1
  12. package/dist/esm5/{index-d8bb542c.js → index-0bcd930a.js} +43 -32
  13. package/dist/esm5/index-0bcd930a.js.map +1 -0
  14. package/dist/esm5/index.js +1 -1
  15. package/dist/esm5/internal.js +2 -2
  16. package/dist/esm5/internal.js.map +1 -1
  17. package/dist/index.webworker.esm5.js +38 -28
  18. package/dist/index.webworker.esm5.js.map +1 -1
  19. package/dist/node/{index-1ef9c819.js → index-5a9d0579.js} +41 -31
  20. package/dist/node/index-5a9d0579.js.map +1 -0
  21. package/dist/node/index.js +1 -1
  22. package/dist/node/internal.js +1 -1
  23. package/dist/node/internal.js.map +1 -1
  24. package/dist/node-esm/{index-d8cb653c.js → index-f3a96a92.js} +29 -21
  25. package/dist/node-esm/index-f3a96a92.js.map +1 -0
  26. package/dist/node-esm/index.js +1 -1
  27. package/dist/node-esm/internal.js +2 -2
  28. package/dist/node-esm/internal.js.map +1 -1
  29. package/dist/rn/index.js +2 -2
  30. package/dist/rn/index.js.map +1 -1
  31. package/dist/rn/internal.js +3 -2
  32. package/dist/rn/internal.js.map +1 -1
  33. package/dist/rn/{phone-4d2c6304.js → phone-54e6b3d3.js} +41 -31
  34. package/dist/rn/phone-54e6b3d3.js.map +1 -0
  35. package/package.json +6 -6
  36. package/dist/cordova/popup_redirect-d24b97e0.js.map +0 -1
  37. package/dist/esm2017/index-107c191e.js.map +0 -1
  38. package/dist/esm5/index-d8bb542c.js.map +0 -1
  39. package/dist/node/index-1ef9c819.js.map +0 -1
  40. package/dist/node-esm/index-d8cb653c.js.map +0 -1
  41. package/dist/rn/phone-4d2c6304.js.map +0 -1
@@ -103,7 +103,7 @@ function _debugErrorMap() {
103
103
  'Please fix by going to the Auth email templates section in the Firebase Console.',
104
104
  _a["invalid-verification-id" /* INVALID_SESSION_INFO */] = 'The verification ID used to create the phone auth credential is invalid.',
105
105
  _a["invalid-tenant-id" /* INVALID_TENANT_ID */] = "The Auth instance's tenant ID is invalid.",
106
- _a["login-blocked" /* LOGIN_BLOCKED */] = "Login blocked by user-provided method: {$originalMessage}",
106
+ _a["login-blocked" /* LOGIN_BLOCKED */] = 'Login blocked by user-provided method: {$originalMessage}',
107
107
  _a["missing-android-pkg-name" /* MISSING_ANDROID_PACKAGE_NAME */] = 'An Android Package Name must be provided if the Android App is required to be installed.',
108
108
  _a["auth-domain-config-required" /* MISSING_AUTH_DOMAIN */] = 'Be sure to include authDomain when calling firebase.initializeApp(), ' +
109
109
  'by following the instructions in the Firebase console.',
@@ -370,7 +370,7 @@ function _errorWithCustomMessage(auth, code, message) {
370
370
  var errorMap = tslib.__assign(tslib.__assign({}, prodErrorMap()), (_a = {}, _a[code] = message, _a));
371
371
  var factory = new util.ErrorFactory('auth', 'Firebase', errorMap);
372
372
  return factory.create(code, {
373
- appName: auth.name,
373
+ appName: auth.name
374
374
  });
375
375
  }
376
376
  function _assertInstanceOf(auth, object, instance) {
@@ -1332,7 +1332,8 @@ var ProactiveRefresh = /** @class */ (function () {
1332
1332
  case 2:
1333
1333
  e_1 = _b.sent();
1334
1334
  // Only retry on network errors
1335
- if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) === "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
1335
+ if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) ===
1336
+ "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
1336
1337
  this.schedule(/* wasError */ true);
1337
1338
  }
1338
1339
  return [2 /*return*/];
@@ -2295,8 +2296,8 @@ function _isWebOS(ua) {
2295
2296
  }
2296
2297
  function _isIOS(ua) {
2297
2298
  if (ua === void 0) { ua = util.getUA(); }
2298
- return /iphone|ipad|ipod/i.test(ua) ||
2299
- (/macintosh/i.test(ua) && /mobile/i.test(ua));
2299
+ return (/iphone|ipad|ipod/i.test(ua) ||
2300
+ (/macintosh/i.test(ua) && /mobile/i.test(ua)));
2300
2301
  }
2301
2302
  function _isIOS7Or8(ua) {
2302
2303
  if (ua === void 0) { ua = util.getUA(); }
@@ -2399,18 +2400,20 @@ var AuthMiddlewareQueue = /** @class */ (function () {
2399
2400
  var _this = this;
2400
2401
  // The callback could be sync or async. Wrap it into a
2401
2402
  // function that is always async.
2402
- var wrappedCallback = function (user) { return new Promise(function (resolve, reject) {
2403
- try {
2404
- var result = callback(user);
2405
- // Either resolve with existing promise or wrap a non-promise
2406
- // return value into a promise.
2407
- resolve(result);
2408
- }
2409
- catch (e) {
2410
- // Sync callback throws.
2411
- reject(e);
2412
- }
2413
- }); };
2403
+ var wrappedCallback = function (user) {
2404
+ return new Promise(function (resolve, reject) {
2405
+ try {
2406
+ var result = callback(user);
2407
+ // Either resolve with existing promise or wrap a non-promise
2408
+ // return value into a promise.
2409
+ resolve(result);
2410
+ }
2411
+ catch (e) {
2412
+ // Sync callback throws.
2413
+ reject(e);
2414
+ }
2415
+ });
2416
+ };
2414
2417
  // Attach the onAbort if present
2415
2418
  wrappedCallback.onAbort = onAbort;
2416
2419
  this.queue.push(wrappedCallback);
@@ -2462,9 +2465,13 @@ var AuthMiddlewareQueue = /** @class */ (function () {
2462
2465
  try {
2463
2466
  onAbort();
2464
2467
  }
2465
- catch (_) { /* swallow error */ }
2468
+ catch (_) {
2469
+ /* swallow error */
2470
+ }
2466
2471
  }
2467
- throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, { originalMessage: (_a = e_1) === null || _a === void 0 ? void 0 : _a.message });
2472
+ throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
2473
+ originalMessage: (_a = e_1) === null || _a === void 0 ? void 0 : _a.message
2474
+ });
2468
2475
  case 7: return [2 /*return*/];
2469
2476
  }
2470
2477
  });
@@ -2661,7 +2668,9 @@ var AuthImpl = /** @class */ (function () {
2661
2668
  futureCurrentUser = previouslyStoredUser;
2662
2669
  // We know this is available since the bit is only set when the
2663
2670
  // resolver is available
2664
- this._popupRedirectResolver._overrideRedirectResult(this, function () { return Promise.reject(e_2); });
2671
+ this._popupRedirectResolver._overrideRedirectResult(this, function () {
2672
+ return Promise.reject(e_2);
2673
+ });
2665
2674
  return [3 /*break*/, 8];
2666
2675
  case 8:
2667
2676
  if (futureCurrentUser) {
@@ -2732,7 +2741,8 @@ var AuthImpl = /** @class */ (function () {
2732
2741
  return [3 /*break*/, 3];
2733
2742
  case 2:
2734
2743
  e_4 = _b.sent();
2735
- if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2744
+ if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !==
2745
+ "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2736
2746
  // Something's wrong with the user's token. Log them out and remove
2737
2747
  // them from storage
2738
2748
  return [2 /*return*/, this.directlySetCurrentUser(null)];
@@ -3015,9 +3025,9 @@ var AuthImpl = /** @class */ (function () {
3015
3025
  case 0:
3016
3026
  if (this.currentUser && this.currentUser !== user) {
3017
3027
  this._currentUser._stopProactiveRefresh();
3018
- if (user && this.isProactiveRefreshEnabled) {
3019
- user._startProactiveRefresh();
3020
- }
3028
+ }
3029
+ if (user && this.isProactiveRefreshEnabled) {
3030
+ user._startProactiveRefresh();
3021
3031
  }
3022
3032
  this.currentUser = user;
3023
3033
  if (!user) return [3 /*break*/, 2];
@@ -3075,8 +3085,9 @@ var AuthImpl = /** @class */ (function () {
3075
3085
  if (this.app.options.appId) {
3076
3086
  headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
3077
3087
  }
3078
- return [4 /*yield*/, ((_a = this.heartbeatServiceProvider.getImmediate({
3079
- optional: true,
3088
+ return [4 /*yield*/, ((_a = this.heartbeatServiceProvider
3089
+ .getImmediate({
3090
+ optional: true
3080
3091
  })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader())];
3081
3092
  case 1:
3082
3093
  heartbeatsHeader = _c.sent();
@@ -3216,8 +3227,7 @@ function emitEmulatorWarning() {
3216
3227
  ' which is intended for local testing only. Do not use with' +
3217
3228
  ' production credentials.');
3218
3229
  }
3219
- if (typeof window !== 'undefined' &&
3220
- typeof document !== 'undefined') {
3230
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
3221
3231
  if (document.readyState === 'loading') {
3222
3232
  window.addEventListener('DOMContentLoaded', attachBanner);
3223
3233
  }
@@ -5185,7 +5195,7 @@ var MultiFactorError = /** @class */ (function (_super) {
5185
5195
  appName: auth.name,
5186
5196
  tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
5187
5197
  _serverResponse: error.customData._serverResponse,
5188
- operationType: operationType,
5198
+ operationType: operationType
5189
5199
  };
5190
5200
  return _this;
5191
5201
  }
@@ -6971,7 +6981,7 @@ function multiFactor(user) {
6971
6981
  }
6972
6982
 
6973
6983
  var name = "@firebase/auth";
6974
- var version = "0.20.5-canary.fcd4b8ac3";
6984
+ var version = "0.20.6";
6975
6985
 
6976
6986
  /**
6977
6987
  * @license
@@ -8499,4 +8509,4 @@ exports.updateProfile = updateProfile;
8499
8509
  exports.useDeviceLanguage = useDeviceLanguage;
8500
8510
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
8501
8511
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
8502
- //# sourceMappingURL=phone-4d2c6304.js.map
8512
+ //# sourceMappingURL=phone-54e6b3d3.js.map