@firebase/auth 0.19.3 → 0.19.4-2021117224551

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 (57) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/auth-public.d.ts +1 -2
  3. package/dist/auth.d.ts +1 -2
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/internal.js +9 -3
  6. package/dist/cordova/internal.js.map +1 -1
  7. package/dist/cordova/popup_redirect-238a0c49.js +9818 -0
  8. package/dist/cordova/popup_redirect-238a0c49.js.map +1 -0
  9. package/dist/cordova/{popup_redirect-1cde31c6.js → popup_redirect-abb8b03d.js} +14 -8
  10. package/dist/cordova/popup_redirect-abb8b03d.js.map +1 -0
  11. package/dist/cordova/src/model/public_types.d.ts +1 -2
  12. package/dist/esm2017/{index-8593558d.js → index-322e428b.js} +12 -3
  13. package/dist/esm2017/index-322e428b.js.map +1 -0
  14. package/dist/esm2017/index-b132db7f.js +9324 -0
  15. package/dist/esm2017/index-b132db7f.js.map +1 -0
  16. package/dist/esm2017/index.js +1 -1
  17. package/dist/esm2017/internal.js +2 -2
  18. package/dist/esm2017/src/model/public_types.d.ts +1 -2
  19. package/dist/esm5/index-52123638.js +11053 -0
  20. package/dist/esm5/index-52123638.js.map +1 -0
  21. package/dist/esm5/{index-4f7e1a18.js → index-7fbc9c07.js} +21 -9
  22. package/dist/esm5/index-7fbc9c07.js.map +1 -0
  23. package/dist/esm5/index.js +1 -1
  24. package/dist/esm5/internal.js +2 -2
  25. package/dist/esm5/src/model/public_types.d.ts +1 -2
  26. package/dist/index.webworker.esm5.js +14 -8
  27. package/dist/index.webworker.esm5.js.map +1 -1
  28. package/dist/node/index-547f3753.js +7210 -0
  29. package/dist/node/index-547f3753.js.map +1 -0
  30. package/dist/node/{index-057dcc31.js → index-55f24e76.js} +14 -8
  31. package/dist/node/index-55f24e76.js.map +1 -0
  32. package/dist/node/index.js +1 -1
  33. package/dist/node/internal.js +1 -1
  34. package/dist/node/src/model/public_types.d.ts +1 -2
  35. package/dist/node-esm/index-7d6d616c.js +6035 -0
  36. package/dist/node-esm/index-7d6d616c.js.map +1 -0
  37. package/dist/node-esm/{index-c327074d.js → index-8d4b7ac8.js} +6 -2
  38. package/dist/node-esm/index-8d4b7ac8.js.map +1 -0
  39. package/dist/node-esm/index.js +1 -1
  40. package/dist/node-esm/internal.js +2 -2
  41. package/dist/node-esm/src/model/public_types.d.ts +1 -2
  42. package/dist/rn/index.js +1 -1
  43. package/dist/rn/internal.js +8 -2
  44. package/dist/rn/internal.js.map +1 -1
  45. package/dist/rn/{phone-4c7624c1.js → phone-48b37abd.js} +14 -8
  46. package/dist/rn/phone-48b37abd.js.map +1 -0
  47. package/dist/rn/phone-f0c6106b.js +8287 -0
  48. package/dist/rn/phone-f0c6106b.js.map +1 -0
  49. package/dist/rn/src/model/public_types.d.ts +1 -2
  50. package/dist/src/model/public_types.d.ts +1 -2
  51. package/package.json +4 -3
  52. package/dist/cordova/popup_redirect-1cde31c6.js.map +0 -1
  53. package/dist/esm2017/index-8593558d.js.map +0 -1
  54. package/dist/esm5/index-4f7e1a18.js.map +0 -1
  55. package/dist/node/index-057dcc31.js.map +0 -1
  56. package/dist/node-esm/index-c327074d.js.map +0 -1
  57. package/dist/rn/phone-4c7624c1.js.map +0 -1
@@ -934,8 +934,7 @@ export interface User extends UserInfo {
934
934
  toJSON(): object;
935
935
  }
936
936
  /**
937
- * A structure containing a {@link User}, an {@link AuthCredential}, the {@link OperationType},
938
- * and any additional user information that was returned from the identity provider.
937
+ * A structure containing a {@link User}, the {@link OperationType}, and the provider ID.
939
938
  *
940
939
  * @remarks
941
940
  * `operationType` could be {@link OperationType}.SIGN_IN for a sign-in operation,
@@ -2185,7 +2185,11 @@ class AuthImpl {
2185
2185
  // Initialize the resolver early if necessary (only applicable to web:
2186
2186
  // this will cause the iframe to load immediately in certain cases)
2187
2187
  if ((_a = this._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {
2188
- await this._popupRedirectResolver._initialize(this);
2188
+ // If this fails, don't halt auth loading
2189
+ try {
2190
+ await this._popupRedirectResolver._initialize(this);
2191
+ }
2192
+ catch (e) { /* Ignore the error */ }
2189
2193
  }
2190
2194
  await this.initializeCurrentUser(popupRedirectResolver);
2191
2195
  this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;
@@ -8685,7 +8689,7 @@ function loadGapi(auth) {
8685
8689
  }
8686
8690
  };
8687
8691
  // Load GApi loader.
8688
- return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`);
8692
+ return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`).catch(e => reject(e));
8689
8693
  }
8690
8694
  }).catch(error => {
8691
8695
  // Reset cached promise to allow for retrial.
@@ -9006,6 +9010,11 @@ class BrowserPopupRedirectResolver {
9006
9010
  }
9007
9011
  const promise = this.initAndGetManager(auth);
9008
9012
  this.eventManagers[key] = { promise };
9013
+ // If the promise is rejected, the key should be removed so that the
9014
+ // operation can be retried later.
9015
+ promise.catch(() => {
9016
+ delete this.eventManagers[key];
9017
+ });
9009
9018
  return promise;
9010
9019
  }
9011
9020
  async initAndGetManager(auth) {
@@ -9312,4 +9321,4 @@ function getAuth(app = getApp()) {
9312
9321
  registerAuth("Browser" /* BROWSER */);
9313
9322
 
9314
9323
  export { sendPasswordResetEmail as $, ActionCodeOperation as A, prodErrorMap as B, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as C, initializeAuth as D, connectAuthEmulator as E, FactorId as F, AuthCredential as G, EmailAuthCredential as H, OAuthCredential as I, PhoneAuthCredential as J, inMemoryPersistence as K, EmailAuthProvider as L, FacebookAuthProvider as M, GoogleAuthProvider as N, OperationType as O, PhoneAuthProvider as P, GithubAuthProvider as Q, RecaptchaVerifier as R, SignInMethod as S, OAuthProvider as T, SAMLAuthProvider as U, TwitterAuthProvider as V, signInAnonymously as W, signInWithCredential as X, linkWithCredential as Y, reauthenticateWithCredential as Z, signInWithCustomToken as _, browserSessionPersistence as a, confirmPasswordReset as a0, applyActionCode as a1, checkActionCode as a2, verifyPasswordResetCode as a3, createUserWithEmailAndPassword as a4, signInWithEmailAndPassword as a5, sendSignInLinkToEmail as a6, isSignInWithEmailLink as a7, signInWithEmailLink as a8, fetchSignInMethodsForEmail as a9, _getRedirectResult as aA, _clearRedirectOutcomes as aB, _castAuth as aC, UserImpl as aD, AuthImpl as aE, _getClientVersion as aF, _generateEventId as aG, AuthPopup as aH, FetchProvider as aI, SAMLAuthCredential as aJ, sendEmailVerification as aa, verifyBeforeUpdateEmail as ab, ActionCodeURL as ac, parseActionCodeURL as ad, updateProfile as ae, updateEmail as af, updatePassword as ag, getIdToken as ah, getIdTokenResult as ai, unlink as aj, getAdditionalUserInfo as ak, reload as al, getMultiFactorResolver as am, multiFactor as an, _isIOS7Or8 as ao, debugAssert as ap, _isIOS as aq, _isAndroid as ar, _fail as as, _getRedirectUrl as at, _getProjectConfig as au, _createError as av, _assert as aw, _getInstance as ax, _persistenceKeyName as ay, AuthEventManager 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, onAuthStateChanged as t, updatePhoneNumber as u, useDeviceLanguage as v, updateCurrentUser as w, signOut as x, deleteUser as y, debugErrorMap as z };
9315
- //# sourceMappingURL=index-8593558d.js.map
9324
+ //# sourceMappingURL=index-322e428b.js.map