@firebase/auth 0.20.3 → 0.20.4-canary.69e2ee064

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 (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/auth-public.d.ts +1 -1
  3. package/dist/auth.d.ts +1 -1
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/internal.js +3 -3
  6. package/dist/cordova/internal.js.map +1 -1
  7. package/dist/cordova/{popup_redirect-9ed330a1.js → popup_redirect-cef46317.js} +40 -34
  8. package/dist/cordova/popup_redirect-cef46317.js.map +1 -0
  9. package/dist/cordova/src/platform_browser/providers/phone.d.ts +1 -1
  10. package/dist/esm2017/{index-69ab4e3a.js → index-4e4ecfae.js} +15 -9
  11. package/dist/esm2017/index-4e4ecfae.js.map +1 -0
  12. package/dist/esm2017/index.js +1 -1
  13. package/dist/esm2017/internal.js +2 -2
  14. package/dist/esm2017/src/platform_browser/providers/phone.d.ts +1 -1
  15. package/dist/esm5/{index-81005f8a.js → index-0c90d444.js} +41 -35
  16. package/dist/esm5/index-0c90d444.js.map +1 -0
  17. package/dist/esm5/index.js +1 -1
  18. package/dist/esm5/internal.js +2 -2
  19. package/dist/esm5/src/platform_browser/providers/phone.d.ts +1 -1
  20. package/dist/index.webworker.esm5.js +37 -32
  21. package/dist/index.webworker.esm5.js.map +1 -1
  22. package/dist/node/{index-007f80f6.js → index-1efe9231.js} +40 -34
  23. package/dist/node/index-1efe9231.js.map +1 -0
  24. package/dist/node/index.js +1 -1
  25. package/dist/node/internal.js +1 -1
  26. package/dist/node/src/platform_browser/providers/phone.d.ts +1 -1
  27. package/dist/node-esm/{index-b1f59f63.js → index-12b5c7c8.js} +14 -8
  28. package/dist/node-esm/index-12b5c7c8.js.map +1 -0
  29. package/dist/node-esm/index.js +1 -1
  30. package/dist/node-esm/internal.js +2 -2
  31. package/dist/node-esm/src/platform_browser/providers/phone.d.ts +1 -1
  32. package/dist/rn/index.js +1 -1
  33. package/dist/rn/internal.js +1 -1
  34. package/dist/rn/{phone-d791a05d.js → phone-679bf220.js} +41 -35
  35. package/dist/rn/phone-679bf220.js.map +1 -0
  36. package/dist/rn/src/platform_browser/providers/phone.d.ts +1 -1
  37. package/dist/src/platform_browser/providers/phone.d.ts +1 -1
  38. package/package.json +6 -6
  39. package/dist/cordova/popup_redirect-9ed330a1.js.map +0 -1
  40. package/dist/esm2017/index-69ab4e3a.js.map +0 -1
  41. package/dist/esm5/index-81005f8a.js.map +0 -1
  42. package/dist/node/index-007f80f6.js.map +0 -1
  43. package/dist/node-esm/index-b1f59f63.js.map +0 -1
  44. package/dist/rn/phone-d791a05d.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-b1f59f63.js';
1
+ export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-12b5c7c8.js';
2
2
  import '@firebase/util';
3
3
  import '@firebase/app';
4
4
  import 'tslib';
@@ -1,5 +1,5 @@
1
- import { ap as _getInstance, aq as _assert, ar as _signInWithCredential, as as _reauthenticate, at as _link$1, H as AuthCredential, au as signInWithIdp, av as _fail, aw as debugAssert, ax as _persistenceKeyName, ay as _castAuth, az as FederatedAuthProvider, aA as BaseOAuthProvider, aB as _emulatorUrl, aC as _performApiRequest, aD as _isIOS7Or8, aE as _isIOS, aF as _isAndroid, aG as _createError, aH as _isSafari, aI as _isIframe, aJ as _isMobileBrowser, aK as _isIE10 } from './index-b1f59f63.js';
2
- export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aM as AuthImpl, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aO as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aP as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aL as UserImpl, aq as _assert, ay as _castAuth, av as _fail, aN as _getClientVersion, ap as _getInstance, ax as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-b1f59f63.js';
1
+ import { ap as _getInstance, aq as _assert, ar as _signInWithCredential, as as _reauthenticate, at as _link$1, H as AuthCredential, au as signInWithIdp, av as _fail, aw as debugAssert, ax as _persistenceKeyName, ay as _castAuth, az as FederatedAuthProvider, aA as BaseOAuthProvider, aB as _emulatorUrl, aC as _performApiRequest, aD as _isIOS7Or8, aE as _isIOS, aF as _isAndroid, aG as _createError, aH as _isSafari, aI as _isIframe, aJ as _isMobileBrowser, aK as _isIE10 } from './index-12b5c7c8.js';
2
+ export { A as ActionCodeOperation, ad as ActionCodeURL, H as AuthCredential, D as AuthErrorCodes, aM as AuthImpl, I as EmailAuthCredential, M as EmailAuthProvider, N as FacebookAuthProvider, F as FactorId, aO as FetchProvider, T as GithubAuthProvider, Q as GoogleAuthProvider, J as OAuthCredential, U as OAuthProvider, O as OperationType, K as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aP as SAMLAuthCredential, V as SAMLAuthProvider, S as SignInMethod, W as TwitterAuthProvider, aL as UserImpl, aq as _assert, ay as _castAuth, av as _fail, aN as _getClientVersion, ap as _getInstance, ax as _persistenceKeyName, a2 as applyActionCode, t as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a3 as checkActionCode, a1 as confirmPasswordReset, G as connectAuthEmulator, a5 as createUserWithEmailAndPassword, B as debugErrorMap, z as deleteUser, aa as fetchSignInMethodsForEmail, al as getAdditionalUserInfo, n as getAuth, ai as getIdToken, aj as getIdTokenResult, an as getMultiFactorResolver, j as getRedirectResult, L as inMemoryPersistence, i as indexedDBLocalPersistence, E as initializeAuth, a8 as isSignInWithEmailLink, Z as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, ao as multiFactor, v as onAuthStateChanged, q as onIdTokenChanged, ae as parseActionCodeURL, C as prodErrorMap, _ as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, am as reload, ab as sendEmailVerification, a0 as sendPasswordResetEmail, a7 as sendSignInLinkToEmail, p as setPersistence, X as signInAnonymously, Y as signInWithCredential, $ as signInWithCustomToken, a6 as signInWithEmailAndPassword, a9 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, y as signOut, ak as unlink, x as updateCurrentUser, ag as updateEmail, ah as updatePassword, u as updatePhoneNumber, af as updateProfile, w as useDeviceLanguage, ac as verifyBeforeUpdateEmail, a4 as verifyPasswordResetCode } from './index-12b5c7c8.js';
3
3
  import { querystring, isEmpty, getUA, querystringDecode } from '@firebase/util';
4
4
  import 'tslib';
5
5
  import { SDK_VERSION } from '@firebase/app';
@@ -133,7 +133,7 @@ export declare class PhoneAuthProvider {
133
133
  * auth.currentUser,
134
134
  * PhoneAuthProvider.credential(verificationId, code));
135
135
  * } catch (e) {
136
- * if (e.code === 'auth/account-exists-with-different-credential') {
136
+ * if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {
137
137
  * const cred = PhoneAuthProvider.credentialFromError(e);
138
138
  * await linkWithCredential(auth.currentUser, cred);
139
139
  * }
package/dist/rn/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var ReactNative = require('react-native');
6
6
  var app = require('@firebase/app');
7
- var phone = require('./phone-d791a05d.js');
7
+ var phone = require('./phone-679bf220.js');
8
8
  var tslib = require('tslib');
9
9
  require('@firebase/util');
10
10
  require('@firebase/component');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var phone = require('./phone-d791a05d.js');
5
+ var phone = require('./phone-679bf220.js');
6
6
  var tslib = require('tslib');
7
7
  var util = require('@firebase/util');
8
8
  var app = require('@firebase/app');
@@ -1157,7 +1157,8 @@ function secondsStringToMilliseconds(seconds) {
1157
1157
  return Number(seconds) * 1000;
1158
1158
  }
1159
1159
  function _parseToken(token) {
1160
- var _a = token.split('.'), algorithm = _a[0], payload = _a[1], signature = _a[2];
1160
+ var _a;
1161
+ var _b = token.split('.'), algorithm = _b[0], payload = _b[1], signature = _b[2];
1161
1162
  if (algorithm === undefined ||
1162
1163
  payload === undefined ||
1163
1164
  signature === undefined) {
@@ -1173,7 +1174,7 @@ function _parseToken(token) {
1173
1174
  return JSON.parse(decoded);
1174
1175
  }
1175
1176
  catch (e) {
1176
- _logError('Caught error parsing JWT payload as JSON', e);
1177
+ _logError('Caught error parsing JWT payload as JSON', (_a = e) === null || _a === void 0 ? void 0 : _a.toString());
1177
1178
  return null;
1178
1179
  }
1179
1180
  }
@@ -1317,20 +1318,21 @@ var ProactiveRefresh = /** @class */ (function () {
1317
1318
  }); }, interval);
1318
1319
  };
1319
1320
  ProactiveRefresh.prototype.iteration = function () {
1321
+ var _a;
1320
1322
  return tslib.__awaiter(this, void 0, void 0, function () {
1321
1323
  var e_1;
1322
- return tslib.__generator(this, function (_a) {
1323
- switch (_a.label) {
1324
+ return tslib.__generator(this, function (_b) {
1325
+ switch (_b.label) {
1324
1326
  case 0:
1325
- _a.trys.push([0, 2, , 3]);
1327
+ _b.trys.push([0, 2, , 3]);
1326
1328
  return [4 /*yield*/, this.user.getIdToken(true)];
1327
1329
  case 1:
1328
- _a.sent();
1330
+ _b.sent();
1329
1331
  return [3 /*break*/, 3];
1330
1332
  case 2:
1331
- e_1 = _a.sent();
1333
+ e_1 = _b.sent();
1332
1334
  // Only retry on network errors
1333
- if (e_1.code === "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
1335
+ if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) === "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
1334
1336
  this.schedule(/* wasError */ true);
1335
1337
  }
1336
1338
  return [2 /*return*/];
@@ -2293,7 +2295,8 @@ function _isWebOS(ua) {
2293
2295
  }
2294
2296
  function _isIOS(ua) {
2295
2297
  if (ua === void 0) { ua = util.getUA(); }
2296
- return /iphone|ipad|ipod/i.test(ua);
2298
+ return /iphone|ipad|ipod/i.test(ua) ||
2299
+ (/macintosh/i.test(ua) && /mobile/i.test(ua));
2297
2300
  }
2298
2301
  function _isIOS7Or8(ua) {
2299
2302
  if (ua === void 0) { ua = util.getUA(); }
@@ -2716,19 +2719,20 @@ var AuthImpl = /** @class */ (function () {
2716
2719
  });
2717
2720
  };
2718
2721
  AuthImpl.prototype.reloadAndSetCurrentUserOrClear = function (user) {
2722
+ var _a;
2719
2723
  return tslib.__awaiter(this, void 0, void 0, function () {
2720
2724
  var e_4;
2721
- return tslib.__generator(this, function (_a) {
2722
- switch (_a.label) {
2725
+ return tslib.__generator(this, function (_b) {
2726
+ switch (_b.label) {
2723
2727
  case 0:
2724
- _a.trys.push([0, 2, , 3]);
2728
+ _b.trys.push([0, 2, , 3]);
2725
2729
  return [4 /*yield*/, _reloadWithoutSaving(user)];
2726
2730
  case 1:
2727
- _a.sent();
2731
+ _b.sent();
2728
2732
  return [3 /*break*/, 3];
2729
2733
  case 2:
2730
- e_4 = _a.sent();
2731
- if (e_4.code !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2734
+ e_4 = _b.sent();
2735
+ if (((_a = e_4) === null || _a === void 0 ? void 0 : _a.code) !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2732
2736
  // Something's wrong with the user's token. Log them out and remove
2733
2737
  // them from storage
2734
2738
  return [2 /*return*/, this.directlySetCurrentUser(null)];
@@ -5345,20 +5349,21 @@ function _assertLinkedStatus(expected, user, provider) {
5345
5349
  * limitations under the License.
5346
5350
  */
5347
5351
  function _reauthenticate(user, credential, bypassAuthState) {
5352
+ var _a;
5348
5353
  if (bypassAuthState === void 0) { bypassAuthState = false; }
5349
5354
  return tslib.__awaiter(this, void 0, void 0, function () {
5350
5355
  var auth, operationType, response, parsed, localId, e_1;
5351
- return tslib.__generator(this, function (_a) {
5352
- switch (_a.label) {
5356
+ return tslib.__generator(this, function (_b) {
5357
+ switch (_b.label) {
5353
5358
  case 0:
5354
5359
  auth = user.auth;
5355
5360
  operationType = "reauthenticate" /* REAUTHENTICATE */;
5356
- _a.label = 1;
5361
+ _b.label = 1;
5357
5362
  case 1:
5358
- _a.trys.push([1, 3, , 4]);
5363
+ _b.trys.push([1, 3, , 4]);
5359
5364
  return [4 /*yield*/, _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState)];
5360
5365
  case 2:
5361
- response = _a.sent();
5366
+ response = _b.sent();
5362
5367
  _assert(response.idToken, auth, "internal-error" /* INTERNAL_ERROR */);
5363
5368
  parsed = _parseToken(response.idToken);
5364
5369
  _assert(parsed, auth, "internal-error" /* INTERNAL_ERROR */);
@@ -5366,9 +5371,9 @@ function _reauthenticate(user, credential, bypassAuthState) {
5366
5371
  _assert(user.uid === localId, auth, "user-mismatch" /* USER_MISMATCH */);
5367
5372
  return [2 /*return*/, UserCredentialImpl._forOperation(user, operationType, response)];
5368
5373
  case 3:
5369
- e_1 = _a.sent();
5374
+ e_1 = _b.sent();
5370
5375
  // Convert user deleted error into user mismatch
5371
- if ((e_1 === null || e_1 === void 0 ? void 0 : e_1.code) === "auth/" + "user-not-found" /* USER_DELETED */) {
5376
+ if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) === "auth/" + "user-not-found" /* USER_DELETED */) {
5372
5377
  _fail(auth, "user-mismatch" /* USER_MISMATCH */);
5373
5378
  }
5374
5379
  throw e_1;
@@ -6894,21 +6899,22 @@ var MultiFactorUserImpl = /** @class */ (function () {
6894
6899
  });
6895
6900
  };
6896
6901
  MultiFactorUserImpl.prototype.unenroll = function (infoOrUid) {
6902
+ var _a;
6897
6903
  return tslib.__awaiter(this, void 0, void 0, function () {
6898
6904
  var mfaEnrollmentId, idToken, idTokenResponse, e_1;
6899
- return tslib.__generator(this, function (_a) {
6900
- switch (_a.label) {
6905
+ return tslib.__generator(this, function (_b) {
6906
+ switch (_b.label) {
6901
6907
  case 0:
6902
6908
  mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;
6903
6909
  return [4 /*yield*/, this.user.getIdToken()];
6904
6910
  case 1:
6905
- idToken = _a.sent();
6911
+ idToken = _b.sent();
6906
6912
  return [4 /*yield*/, _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {
6907
6913
  idToken: idToken,
6908
6914
  mfaEnrollmentId: mfaEnrollmentId
6909
6915
  }))];
6910
6916
  case 2:
6911
- idTokenResponse = _a.sent();
6917
+ idTokenResponse = _b.sent();
6912
6918
  // Remove the second factor from the user's list.
6913
6919
  this.enrolledFactors = this.enrolledFactors.filter(function (_a) {
6914
6920
  var uid = _a.uid;
@@ -6924,17 +6930,17 @@ var MultiFactorUserImpl = /** @class */ (function () {
6924
6930
  // the tokenResponse may be empty. If the tokens were not updated (and they
6925
6931
  // are now invalid), reloading the user will discover this and invalidate
6926
6932
  // the user's state accordingly.
6927
- _a.sent();
6928
- _a.label = 4;
6933
+ _b.sent();
6934
+ _b.label = 4;
6929
6935
  case 4:
6930
- _a.trys.push([4, 6, , 7]);
6936
+ _b.trys.push([4, 6, , 7]);
6931
6937
  return [4 /*yield*/, this.user.reload()];
6932
6938
  case 5:
6933
- _a.sent();
6939
+ _b.sent();
6934
6940
  return [3 /*break*/, 7];
6935
6941
  case 6:
6936
- e_1 = _a.sent();
6937
- if (e_1.code !== "auth/" + "user-token-expired" /* TOKEN_EXPIRED */) {
6942
+ e_1 = _b.sent();
6943
+ if (((_a = e_1) === null || _a === void 0 ? void 0 : _a.code) !== "auth/" + "user-token-expired" /* TOKEN_EXPIRED */) {
6938
6944
  throw e_1;
6939
6945
  }
6940
6946
  return [3 /*break*/, 7];
@@ -6965,7 +6971,7 @@ function multiFactor(user) {
6965
6971
  }
6966
6972
 
6967
6973
  var name = "@firebase/auth";
6968
- var version = "0.20.3";
6974
+ var version = "0.20.4-canary.69e2ee064";
6969
6975
 
6970
6976
  /**
6971
6977
  * @license
@@ -8272,7 +8278,7 @@ var PhoneAuthProvider = /** @class */ (function () {
8272
8278
  * auth.currentUser,
8273
8279
  * PhoneAuthProvider.credential(verificationId, code));
8274
8280
  * } catch (e) {
8275
- * if (e.code === 'auth/account-exists-with-different-credential') {
8281
+ * if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {
8276
8282
  * const cred = PhoneAuthProvider.credentialFromError(e);
8277
8283
  * await linkWithCredential(auth.currentUser, cred);
8278
8284
  * }
@@ -8490,4 +8496,4 @@ exports.updateProfile = updateProfile;
8490
8496
  exports.useDeviceLanguage = useDeviceLanguage;
8491
8497
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
8492
8498
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
8493
- //# sourceMappingURL=phone-d791a05d.js.map
8499
+ //# sourceMappingURL=phone-679bf220.js.map