@firebase/auth 0.20.4 → 0.20.5-20220707195244

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 (42) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cordova/index.js +2 -2
  3. package/dist/cordova/internal.js +11 -4
  4. package/dist/cordova/internal.js.map +1 -1
  5. package/dist/cordova/{popup_redirect-e75f0604.js → popup_redirect-4aad3eda.js} +4 -3
  6. package/dist/cordova/popup_redirect-4aad3eda.js.map +1 -0
  7. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  8. package/dist/esm2017/{index-58473f72.js → index-3301b06c.js} +13 -5
  9. package/dist/esm2017/index-3301b06c.js.map +1 -0
  10. package/dist/esm2017/index.js +1 -1
  11. package/dist/esm2017/internal.js +2 -2
  12. package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  13. package/dist/esm5/{index-37b12497.js → index-8278829f.js} +13 -5
  14. package/dist/esm5/index-8278829f.js.map +1 -0
  15. package/dist/esm5/index.js +1 -1
  16. package/dist/esm5/internal.js +2 -2
  17. package/dist/esm5/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  18. package/dist/index.webworker.esm5.js +1 -1
  19. package/dist/index.webworker.esm5.js.map +1 -1
  20. package/dist/node/{index-f9288b31.js → index-17564cbf.js} +4 -3
  21. package/dist/node/index-17564cbf.js.map +1 -0
  22. package/dist/node/index.js +1 -1
  23. package/dist/node/internal.js +1 -1
  24. package/dist/node/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  25. package/dist/node-esm/{index-a262d8f8.js → index-f3d283d7.js} +4 -3
  26. package/dist/node-esm/index-f3d283d7.js.map +1 -0
  27. package/dist/node-esm/index.js +1 -1
  28. package/dist/node-esm/internal.js +2 -2
  29. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  30. package/dist/rn/index.js +1 -1
  31. package/dist/rn/internal.js +1 -1
  32. package/dist/rn/{phone-d36aa73c.js → phone-f5af5b18.js} +13 -5
  33. package/dist/rn/phone-f5af5b18.js.map +1 -0
  34. package/dist/rn/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  35. package/dist/src/platform_browser/recaptcha/recaptcha_loader.d.ts +5 -0
  36. package/package.json +5 -5
  37. package/dist/cordova/popup_redirect-e75f0604.js.map +0 -1
  38. package/dist/esm2017/index-58473f72.js.map +0 -1
  39. package/dist/esm5/index-37b12497.js.map +0 -1
  40. package/dist/node/index-f9288b31.js.map +0 -1
  41. package/dist/node-esm/index-a262d8f8.js.map +0 -1
  42. package/dist/rn/phone-d36aa73c.js.map +0 -1
@@ -33,6 +33,11 @@ export interface ReCaptchaLoader {
33
33
  export declare class ReCaptchaLoaderImpl implements ReCaptchaLoader {
34
34
  private hostLanguage;
35
35
  private counter;
36
+ /**
37
+ * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise
38
+ * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
39
+ * `window.grecaptcha.render()` will not. Another load will add it.
40
+ */
36
41
  private readonly librarySeparatelyLoaded;
37
42
  load(auth: AuthInternal, hl?: string): Promise<Recaptcha>;
38
43
  clearedOneInstance(): void;
@@ -2048,7 +2048,8 @@ function _isWebOS(ua = getUA()) {
2048
2048
  return /webos/i.test(ua);
2049
2049
  }
2050
2050
  function _isIOS(ua = getUA()) {
2051
- return /iphone|ipad|ipod/i.test(ua);
2051
+ return /iphone|ipad|ipod/i.test(ua) ||
2052
+ (/macintosh/i.test(ua) && /mobile/i.test(ua));
2052
2053
  }
2053
2054
  function _isIOS7Or8(ua = getUA()) {
2054
2055
  return (/(iPad|iPhone|iPod).*OS 7_\d/i.test(ua) ||
@@ -7212,9 +7213,15 @@ const RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';
7212
7213
  */
7213
7214
  class ReCaptchaLoaderImpl {
7214
7215
  constructor() {
7216
+ var _a;
7215
7217
  this.hostLanguage = '';
7216
7218
  this.counter = 0;
7217
- this.librarySeparatelyLoaded = !!_window().grecaptcha;
7219
+ /**
7220
+ * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise
7221
+ * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
7222
+ * `window.grecaptcha.render()` will not. Another load will add it.
7223
+ */
7224
+ this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);
7218
7225
  }
7219
7226
  load(auth, hl = '') {
7220
7227
  _assert(isHostLanguageValid(hl), auth, "argument-error" /* ARGUMENT_ERROR */);
@@ -7259,6 +7266,7 @@ class ReCaptchaLoaderImpl {
7259
7266
  this.counter--;
7260
7267
  }
7261
7268
  shouldResolveImmediately(hl) {
7269
+ var _a;
7262
7270
  // We can resolve immediately if:
7263
7271
  // • grecaptcha is already defined AND (
7264
7272
  // 1. the requested language codes are the same OR
@@ -7266,7 +7274,7 @@ class ReCaptchaLoaderImpl {
7266
7274
  // 3. the library was already loaded by the app
7267
7275
  // In cases (2) and (3), we _can't_ reload as it would break the recaptchas
7268
7276
  // that are already in the page
7269
- return (!!_window().grecaptcha &&
7277
+ return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&
7270
7278
  (hl === this.hostLanguage ||
7271
7279
  this.counter > 0 ||
7272
7280
  this.librarySeparatelyLoaded));
@@ -9282,7 +9290,7 @@ class PhoneMultiFactorGenerator {
9282
9290
  PhoneMultiFactorGenerator.FACTOR_ID = 'phone';
9283
9291
 
9284
9292
  var name = "@firebase/auth";
9285
- var version = "0.20.4";
9293
+ var version = "0.20.5-20220707195244";
9286
9294
 
9287
9295
  /**
9288
9296
  * @license
@@ -9473,4 +9481,4 @@ function getAuth(app = getApp()) {
9473
9481
  registerAuth("Browser" /* BROWSER */);
9474
9482
 
9475
9483
  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, AuthEventManager as aA, _getRedirectResult as aB, _overrideRedirectResult as aC, _clearRedirectOutcomes as aD, _castAuth as aE, UserImpl as aF, AuthImpl as aG, _getClientVersion as aH, _generateEventId as aI, AuthPopup as aJ, FetchProvider as aK, SAMLAuthCredential as aL, 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, _isIOS7Or8 as ap, debugAssert as aq, _isIOS as ar, _isAndroid as as, _fail as at, _getRedirectUrl as au, _getProjectConfig as av, _createError as aw, _assert as ax, _getInstance as ay, _persistenceKeyName 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 };
9476
- //# sourceMappingURL=index-58473f72.js.map
9484
+ //# sourceMappingURL=index-3301b06c.js.map