@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
@@ -199,7 +199,7 @@ function _debugErrorMap() {
199
199
  'Please fix by going to the Auth email templates section in the Firebase Console.',
200
200
  ["invalid-verification-id" /* INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',
201
201
  ["invalid-tenant-id" /* INVALID_TENANT_ID */]: "The Auth instance's tenant ID is invalid.",
202
- ["login-blocked" /* LOGIN_BLOCKED */]: "Login blocked by user-provided method: {$originalMessage}",
202
+ ["login-blocked" /* LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',
203
203
  ["missing-android-pkg-name" /* MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',
204
204
  ["auth-domain-config-required" /* MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' +
205
205
  'by following the instructions in the Firebase console.',
@@ -452,7 +452,7 @@ function _errorWithCustomMessage(auth, code, message) {
452
452
  const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
453
453
  const factory = new ErrorFactory('auth', 'Firebase', errorMap);
454
454
  return factory.create(code, {
455
- appName: auth.name,
455
+ appName: auth.name
456
456
  });
457
457
  }
458
458
  function createErrorInternal(authOrCode, ...rest) {
@@ -875,7 +875,7 @@ const SERVER_ERROR_MAP = {
875
875
  ["SECOND_FACTOR_EXISTS" /* SECOND_FACTOR_EXISTS */]: "second-factor-already-in-use" /* SECOND_FACTOR_ALREADY_ENROLLED */,
876
876
  ["SECOND_FACTOR_LIMIT_EXCEEDED" /* SECOND_FACTOR_LIMIT_EXCEEDED */]: "maximum-second-factor-count-exceeded" /* SECOND_FACTOR_LIMIT_EXCEEDED */,
877
877
  // Blocking functions related errors.
878
- ["BLOCKING_FUNCTION_ERROR_RESPONSE" /* BLOCKING_FUNCTION_ERROR_RESPONSE */]: "internal-error" /* INTERNAL_ERROR */,
878
+ ["BLOCKING_FUNCTION_ERROR_RESPONSE" /* BLOCKING_FUNCTION_ERROR_RESPONSE */]: "internal-error" /* INTERNAL_ERROR */
879
879
  };
880
880
 
881
881
  /**
@@ -1293,7 +1293,8 @@ class ProactiveRefresh {
1293
1293
  }
1294
1294
  catch (e) {
1295
1295
  // Only retry on network errors
1296
- if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) === `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
1296
+ if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) ===
1297
+ `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
1297
1298
  this.schedule(/* wasError */ true);
1298
1299
  }
1299
1300
  return;
@@ -2039,8 +2040,8 @@ function _isWebOS(ua = getUA()) {
2039
2040
  return /webos/i.test(ua);
2040
2041
  }
2041
2042
  function _isIOS(ua = getUA()) {
2042
- return /iphone|ipad|ipod/i.test(ua) ||
2043
- (/macintosh/i.test(ua) && /mobile/i.test(ua));
2043
+ return (/iphone|ipad|ipod/i.test(ua) ||
2044
+ (/macintosh/i.test(ua) && /mobile/i.test(ua)));
2044
2045
  }
2045
2046
  function _isIOS7Or8(ua = getUA()) {
2046
2047
  return (/(iPad|iPhone|iPod).*OS 7_\d/i.test(ua) ||
@@ -2181,9 +2182,13 @@ class AuthMiddlewareQueue {
2181
2182
  try {
2182
2183
  onAbort();
2183
2184
  }
2184
- catch (_) { /* swallow error */ }
2185
+ catch (_) {
2186
+ /* swallow error */
2187
+ }
2185
2188
  }
2186
- throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, { originalMessage: (_a = e) === null || _a === void 0 ? void 0 : _a.message });
2189
+ throw this.auth._errorFactory.create("login-blocked" /* LOGIN_BLOCKED */, {
2190
+ originalMessage: (_a = e) === null || _a === void 0 ? void 0 : _a.message
2191
+ });
2187
2192
  }
2188
2193
  }
2189
2194
  }
@@ -2258,7 +2263,9 @@ class AuthImpl {
2258
2263
  try {
2259
2264
  await this._popupRedirectResolver._initialize(this);
2260
2265
  }
2261
- catch (e) { /* Ignore the error */ }
2266
+ catch (e) {
2267
+ /* Ignore the error */
2268
+ }
2262
2269
  }
2263
2270
  await this.initializeCurrentUser(popupRedirectResolver);
2264
2271
  this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;
@@ -2386,7 +2393,8 @@ class AuthImpl {
2386
2393
  await _reloadWithoutSaving(user);
2387
2394
  }
2388
2395
  catch (e) {
2389
- if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !== `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
2396
+ if (((_a = e) === null || _a === void 0 ? void 0 : _a.code) !==
2397
+ `auth/${"network-request-failed" /* NETWORK_REQUEST_FAILED */}`) {
2390
2398
  // Something's wrong with the user's token. Log them out and remove
2391
2399
  // them from storage
2392
2400
  return this.directlySetCurrentUser(null);
@@ -2569,9 +2577,9 @@ class AuthImpl {
2569
2577
  async directlySetCurrentUser(user) {
2570
2578
  if (this.currentUser && this.currentUser !== user) {
2571
2579
  this._currentUser._stopProactiveRefresh();
2572
- if (user && this.isProactiveRefreshEnabled) {
2573
- user._startProactiveRefresh();
2574
- }
2580
+ }
2581
+ if (user && this.isProactiveRefreshEnabled) {
2582
+ user._startProactiveRefresh();
2575
2583
  }
2576
2584
  this.currentUser = user;
2577
2585
  if (user) {
@@ -2608,14 +2616,15 @@ class AuthImpl {
2608
2616
  var _a;
2609
2617
  // Additional headers on every request
2610
2618
  const headers = {
2611
- ["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion,
2619
+ ["X-Client-Version" /* X_CLIENT_VERSION */]: this.clientVersion
2612
2620
  };
2613
2621
  if (this.app.options.appId) {
2614
2622
  headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
2615
2623
  }
2616
2624
  // If the heartbeat service exists, add the heartbeat string
2617
- const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider.getImmediate({
2618
- optional: true,
2625
+ const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
2626
+ .getImmediate({
2627
+ optional: true
2619
2628
  })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
2620
2629
  if (heartbeatsHeader) {
2621
2630
  headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
@@ -2743,8 +2752,7 @@ function emitEmulatorWarning() {
2743
2752
  ' which is intended for local testing only. Do not use with' +
2744
2753
  ' production credentials.');
2745
2754
  }
2746
- if (typeof window !== 'undefined' &&
2747
- typeof document !== 'undefined') {
2755
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
2748
2756
  if (document.readyState === 'loading') {
2749
2757
  window.addEventListener('DOMContentLoaded', attachBanner);
2750
2758
  }
@@ -4542,7 +4550,7 @@ class MultiFactorError extends FirebaseError {
4542
4550
  appName: auth.name,
4543
4551
  tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
4544
4552
  _serverResponse: error.customData._serverResponse,
4545
- operationType,
4553
+ operationType
4546
4554
  };
4547
4555
  }
4548
4556
  static _fromErrorAndOperation(auth, error, operationType, user) {
@@ -5954,7 +5962,7 @@ function multiFactor(user) {
5954
5962
  }
5955
5963
 
5956
5964
  var name = "@firebase/auth";
5957
- var version = "0.20.5-canary.fcd4b8ac3";
5965
+ var version = "0.20.6";
5958
5966
 
5959
5967
  /**
5960
5968
  * @license
@@ -6181,4 +6189,4 @@ class PhoneMultiFactorGenerator {
6181
6189
  AuthImpl.prototype.setPersistence = async () => { };
6182
6190
 
6183
6191
  export { signInWithCustomToken as $, ActionCodeOperation as A, debugErrorMap as B, prodErrorMap as C, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as D, initializeAuth as E, FactorId as F, connectAuthEmulator as G, AuthCredential as H, EmailAuthCredential as I, OAuthCredential as J, PhoneAuthCredential as K, inMemoryPersistence as L, EmailAuthProvider as M, FacebookAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GoogleAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, GithubAuthProvider as T, OAuthProvider as U, SAMLAuthProvider as V, TwitterAuthProvider as W, signInAnonymously as X, signInWithCredential as Y, linkWithCredential as Z, reauthenticateWithCredential as _, browserSessionPersistence as a, sendPasswordResetEmail as a0, confirmPasswordReset as a1, applyActionCode as a2, checkActionCode as a3, verifyPasswordResetCode as a4, createUserWithEmailAndPassword as a5, signInWithEmailAndPassword as a6, sendSignInLinkToEmail as a7, isSignInWithEmailLink as a8, signInWithEmailLink as a9, BaseOAuthProvider as aA, _emulatorUrl as aB, _performApiRequest as aC, _isIOS7Or8 as aD, _isIOS as aE, _isAndroid as aF, _createError as aG, _isSafari as aH, _isIframe as aI, _isMobileBrowser as aJ, _isIE10 as aK, UserImpl as aL, AuthImpl as aM, _getClientVersion as aN, FetchProvider as aO, SAMLAuthCredential as aP, fetchSignInMethodsForEmail as aa, sendEmailVerification as ab, verifyBeforeUpdateEmail as ac, ActionCodeURL as ad, parseActionCodeURL as ae, updateProfile as af, updateEmail as ag, updatePassword as ah, getIdToken as ai, getIdTokenResult as aj, unlink as ak, getAdditionalUserInfo as al, reload as am, getMultiFactorResolver as an, multiFactor as ao, _getInstance as ap, _assert as aq, _signInWithCredential as ar, _reauthenticate as as, _link as at, signInWithIdp as au, _fail as av, debugAssert as aw, _persistenceKeyName as ax, _castAuth as ay, FederatedAuthProvider as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, getAuth as n, ProviderId as o, setPersistence as p, onIdTokenChanged as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, beforeAuthStateChanged as t, updatePhoneNumber as u, onAuthStateChanged as v, useDeviceLanguage as w, updateCurrentUser as x, signOut as y, deleteUser as z };
6184
- //# sourceMappingURL=index-d8cb653c.js.map
6192
+ //# sourceMappingURL=index-f3a96a92.js.map