@firebase/auth 0.19.9-canary.e987dac26 → 0.19.10

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 (55) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cordova/index.js +2 -2
  3. package/dist/cordova/internal.js +2 -2
  4. package/dist/cordova/{popup_redirect-93adefc5.js → popup_redirect-0aea9243.js} +29 -15
  5. package/dist/cordova/popup_redirect-0aea9243.js.map +1 -0
  6. package/dist/cordova/src/api/index.d.ts +2 -1
  7. package/dist/cordova/src/core/auth/auth_impl.d.ts +3 -1
  8. package/dist/cordova/test/helpers/mock_auth.d.ts +5 -0
  9. package/dist/esm2017/{index-8c58cb89.js → index-f69a28d8.js} +16 -6
  10. package/dist/esm2017/index-f69a28d8.js.map +1 -0
  11. package/dist/esm2017/index.js +1 -1
  12. package/dist/esm2017/internal.js +2 -2
  13. package/dist/esm2017/src/api/index.d.ts +2 -1
  14. package/dist/esm2017/src/core/auth/auth_impl.d.ts +3 -1
  15. package/dist/esm2017/test/helpers/mock_auth.d.ts +5 -0
  16. package/dist/esm5/{index-f7d6fb6f.js → index-f92b2f5a.js} +29 -15
  17. package/dist/esm5/index-f92b2f5a.js.map +1 -0
  18. package/dist/esm5/index.js +1 -1
  19. package/dist/esm5/internal.js +2 -2
  20. package/dist/esm5/src/api/index.d.ts +2 -1
  21. package/dist/esm5/src/core/auth/auth_impl.d.ts +3 -1
  22. package/dist/esm5/test/helpers/mock_auth.d.ts +5 -0
  23. package/dist/index.webworker.esm5.js +28 -14
  24. package/dist/index.webworker.esm5.js.map +1 -1
  25. package/dist/node/{index-b52d4a00.js → index-35c8d2ed.js} +29 -15
  26. package/dist/node/index-35c8d2ed.js.map +1 -0
  27. package/dist/node/index.js +1 -1
  28. package/dist/node/internal.js +1 -1
  29. package/dist/node/src/api/index.d.ts +2 -1
  30. package/dist/node/src/core/auth/auth_impl.d.ts +3 -1
  31. package/dist/node/test/helpers/mock_auth.d.ts +5 -0
  32. package/dist/node-esm/{index-eb8600c0.js → index-a995c608.js} +16 -6
  33. package/dist/node-esm/index-a995c608.js.map +1 -0
  34. package/dist/node-esm/index.js +1 -1
  35. package/dist/node-esm/internal.js +2 -2
  36. package/dist/node-esm/src/api/index.d.ts +2 -1
  37. package/dist/node-esm/src/core/auth/auth_impl.d.ts +3 -1
  38. package/dist/node-esm/test/helpers/mock_auth.d.ts +5 -0
  39. package/dist/rn/index.js +1 -1
  40. package/dist/rn/internal.js +1 -1
  41. package/dist/rn/{phone-c61e906b.js → phone-d5d8976b.js} +29 -15
  42. package/dist/rn/phone-d5d8976b.js.map +1 -0
  43. package/dist/rn/src/api/index.d.ts +2 -1
  44. package/dist/rn/src/core/auth/auth_impl.d.ts +3 -1
  45. package/dist/rn/test/helpers/mock_auth.d.ts +5 -0
  46. package/dist/src/api/index.d.ts +2 -1
  47. package/dist/src/core/auth/auth_impl.d.ts +3 -1
  48. package/dist/test/helpers/mock_auth.d.ts +5 -0
  49. package/package.json +6 -6
  50. package/dist/cordova/popup_redirect-93adefc5.js.map +0 -1
  51. package/dist/esm2017/index-8c58cb89.js.map +0 -1
  52. package/dist/esm5/index-f7d6fb6f.js.map +0 -1
  53. package/dist/node/index-b52d4a00.js.map +0 -1
  54. package/dist/node-esm/index-eb8600c0.js.map +0 -1
  55. package/dist/rn/phone-c61e906b.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @firebase/auth
2
2
 
3
+ ## 0.19.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7405e7d59`](https://github.com/firebase/firebase-js-sdk/commit/7405e7d593b40c9945c32ffbe66ac6fb11e2991e) [#6033](https://github.com/firebase/firebase-js-sdk/pull/6033) - Heartbeat
8
+
9
+ - Updated dependencies [[`2d672cead`](https://github.com/firebase/firebase-js-sdk/commit/2d672cead167187cb714cd89b638c0884ba58f03)]:
10
+ - @firebase/util@1.5.0
11
+ - @firebase/component@0.5.11
12
+
3
13
  ## 0.19.9
4
14
 
5
15
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { getApp, _getProvider } from '@firebase/app';
2
- import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-93adefc5.js';
3
- export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-93adefc5.js';
2
+ import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-0aea9243.js';
3
+ export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-0aea9243.js';
4
4
  import 'tslib';
5
5
  import '@firebase/util';
6
6
  import '@firebase/component';
@@ -1,5 +1,5 @@
1
- import { ae as _performApiRequest, af as _addTidIfNecessary, ag as _createError, ah as _assert, ai as Delay, aj as _window, ak as _isHttpOrHttps, al as _isWorker, am as _castAuth, I as signInWithCredential, an as sendPhoneVerificationCode, ao as startEnrollPhoneMfa, J as linkWithCredential, ap as _assertLinkedStatus, K as reauthenticateWithCredential, aq as _link, w as PhoneAuthCredential, ar as debugAssert, as as _generateEventId, at as AbstractPopupRedirectOperation, au as _assertInstanceOf, av as _withDefaultResolver, aw as FederatedAuthProvider, ax as _fail, ay as _getProjectConfig, az as _getCurrentUrl, aA as _emulatorUrl, aB as _isChromeIOS, aC as _isFirefox, aD as _isIOSStandalone, aE as _isMobileBrowser, aF as _isSafari, aG as _isIOS, f as browserSessionPersistence, aH as _getRedirectResult, aI as _getRedirectUrl, aJ as _setWindowLocation, aK as AuthEventManager, aL as debugFail, aM as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence } from './popup_redirect-93adefc5.js';
2
- export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, aQ as AuthImpl, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, aS as FetchProvider, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, aT as SAMLAuthCredential, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aO as UserImpl, ah as _assert, am as _castAuth, ax as _fail, as as _generateEventId, aR as _getClientVersion, aP as _getInstance, aH as _getRedirectResult, aN as _persistenceKeyName, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, aV as linkWithRedirect, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, aW as reauthenticateWithRedirect, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, aU as signInWithRedirect, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-93adefc5.js';
1
+ import { ae as _performApiRequest, af as _addTidIfNecessary, ag as _createError, ah as _assert, ai as Delay, aj as _window, ak as _isHttpOrHttps, al as _isWorker, am as _castAuth, I as signInWithCredential, an as sendPhoneVerificationCode, ao as startEnrollPhoneMfa, J as linkWithCredential, ap as _assertLinkedStatus, K as reauthenticateWithCredential, aq as _link, w as PhoneAuthCredential, ar as debugAssert, as as _generateEventId, at as AbstractPopupRedirectOperation, au as _assertInstanceOf, av as _withDefaultResolver, aw as FederatedAuthProvider, ax as _fail, ay as _getProjectConfig, az as _getCurrentUrl, aA as _emulatorUrl, aB as _isChromeIOS, aC as _isFirefox, aD as _isIOSStandalone, aE as _isMobileBrowser, aF as _isSafari, aG as _isIOS, f as browserSessionPersistence, aH as _getRedirectResult, aI as _getRedirectUrl, aJ as _setWindowLocation, aK as AuthEventManager, aL as debugFail, aM as finalizeEnrollPhoneMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence } from './popup_redirect-0aea9243.js';
2
+ export { A as ActionCodeOperation, a2 as ActionCodeURL, t as AuthCredential, n as AuthErrorCodes, aQ as AuthImpl, E as EmailAuthCredential, y as EmailAuthProvider, z as FacebookAuthProvider, F as FactorId, aS as FetchProvider, B as GithubAuthProvider, G as GoogleAuthProvider, v as OAuthCredential, C as OAuthProvider, O as OperationType, w as PhoneAuthCredential, P as ProviderId, aT as SAMLAuthCredential, D as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aO as UserImpl, ah as _assert, am as _castAuth, ax as _fail, as as _generateEventId, aR as _getClientVersion, aP as _getInstance, aH as _getRedirectResult, aN as _persistenceKeyName, Q as applyActionCode, e as browserLocalPersistence, f as browserSessionPersistence, R as checkActionCode, N as confirmPasswordReset, q as connectAuthEmulator, d as cordovaPopupRedirectResolver, V as createUserWithEmailAndPassword, m as debugErrorMap, l as deleteUser, $ as fetchSignInMethodsForEmail, aa as getAdditionalUserInfo, a7 as getIdToken, a8 as getIdTokenResult, ac as getMultiFactorResolver, g as getRedirectResult, x as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, Y as isSignInWithEmailLink, J as linkWithCredential, aV as linkWithRedirect, ad as multiFactor, h as onAuthStateChanged, o as onIdTokenChanged, a3 as parseActionCodeURL, p as prodErrorMap, K as reauthenticateWithCredential, aW as reauthenticateWithRedirect, ab as reload, a0 as sendEmailVerification, M as sendPasswordResetEmail, X as sendSignInLinkToEmail, s as setPersistence, H as signInAnonymously, I as signInWithCredential, L as signInWithCustomToken, W as signInWithEmailAndPassword, Z as signInWithEmailLink, aU as signInWithRedirect, k as signOut, a9 as unlink, j as updateCurrentUser, a5 as updateEmail, a6 as updatePassword, a4 as updateProfile, u as useDeviceLanguage, a1 as verifyBeforeUpdateEmail, U as verifyPasswordResetCode } from './popup_redirect-0aea9243.js';
3
3
  import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
4
4
  import { querystring, getModularInstance, getUA } from '@firebase/util';
5
5
  import { SDK_VERSION, getApp, _getProvider } from '@firebase/app';
@@ -3296,8 +3296,9 @@ function _getClientVersion(clientPlatform, frameworks) {
3296
3296
  * limitations under the License.
3297
3297
  */
3298
3298
  var AuthImpl = /** @class */ (function () {
3299
- function AuthImpl(app, config) {
3299
+ function AuthImpl(app, heartbeatServiceProvider, config) {
3300
3300
  this.app = app;
3301
+ this.heartbeatServiceProvider = heartbeatServiceProvider;
3301
3302
  this.config = config;
3302
3303
  this.currentUser = null;
3303
3304
  this.emulatorConfig = null;
@@ -3822,17 +3823,29 @@ var AuthImpl = /** @class */ (function () {
3822
3823
  return this.frameworks;
3823
3824
  };
3824
3825
  AuthImpl.prototype._getAdditionalHeaders = function () {
3826
+ var _a;
3825
3827
  return __awaiter(this, void 0, void 0, function () {
3826
- var headers;
3827
- var _a;
3828
- return __generator(this, function (_b) {
3829
- headers = (_a = {},
3830
- _a["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
3831
- _a);
3832
- if (this.app.options.appId) {
3833
- headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
3828
+ var headers, heartbeatsHeader;
3829
+ var _b;
3830
+ return __generator(this, function (_c) {
3831
+ switch (_c.label) {
3832
+ case 0:
3833
+ headers = (_b = {},
3834
+ _b["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
3835
+ _b);
3836
+ if (this.app.options.appId) {
3837
+ headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
3838
+ }
3839
+ return [4 /*yield*/, ((_a = this.heartbeatServiceProvider.getImmediate({
3840
+ optional: true,
3841
+ })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader())];
3842
+ case 1:
3843
+ heartbeatsHeader = _c.sent();
3844
+ if (heartbeatsHeader) {
3845
+ headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
3846
+ }
3847
+ return [2 /*return*/, headers];
3834
3848
  }
3835
- return [2 /*return*/, headers];
3836
3849
  });
3837
3850
  });
3838
3851
  };
@@ -7698,7 +7711,7 @@ function multiFactor(user) {
7698
7711
  }
7699
7712
 
7700
7713
  var name = "@firebase/auth";
7701
- var version = "0.19.9-canary.e987dac26";
7714
+ var version = "0.19.10";
7702
7715
 
7703
7716
  /**
7704
7717
  * @license
@@ -7818,8 +7831,9 @@ function registerAuth(clientPlatform) {
7818
7831
  _registerComponent(new Component("auth" /* AUTH */, function (container, _a) {
7819
7832
  var deps = _a.options;
7820
7833
  var app = container.getProvider('app').getImmediate();
7834
+ var heartbeatServiceProvider = container.getProvider('heartbeat');
7821
7835
  var _b = app.options, apiKey = _b.apiKey, authDomain = _b.authDomain;
7822
- return (function (app) {
7836
+ return (function (app, heartbeatServiceProvider) {
7823
7837
  _assert(apiKey && !apiKey.includes(':'), "invalid-api-key" /* INVALID_API_KEY */, { appName: app.name });
7824
7838
  // Auth domain is optional if IdP sign in isn't being used
7825
7839
  _assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(':')), "argument-error" /* ARGUMENT_ERROR */, {
@@ -7834,10 +7848,10 @@ function registerAuth(clientPlatform) {
7834
7848
  apiScheme: "https" /* API_SCHEME */,
7835
7849
  sdkClientVersion: _getClientVersion(clientPlatform)
7836
7850
  };
7837
- var authInstance = new AuthImpl(app, config);
7851
+ var authInstance = new AuthImpl(app, heartbeatServiceProvider, config);
7838
7852
  _initializeAuthInstance(authInstance, deps);
7839
7853
  return authInstance;
7840
- })(app);
7854
+ })(app, heartbeatServiceProvider);
7841
7855
  }, "PUBLIC" /* PUBLIC */)
7842
7856
  /**
7843
7857
  * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()
@@ -9840,4 +9854,4 @@ function generateNoEvent() {
9840
9854
  }
9841
9855
 
9842
9856
  export { fetchSignInMethodsForEmail as $, ActionCodeOperation as A, GithubAuthProvider as B, OAuthProvider as C, SAMLAuthProvider as D, EmailAuthCredential as E, FactorId as F, GoogleAuthProvider as G, signInAnonymously as H, signInWithCredential as I, linkWithCredential as J, reauthenticateWithCredential as K, signInWithCustomToken as L, sendPasswordResetEmail as M, confirmPasswordReset as N, OperationType as O, ProviderId as P, applyActionCode as Q, checkActionCode as R, SignInMethod as S, TwitterAuthProvider as T, verifyPasswordResetCode as U, createUserWithEmailAndPassword as V, signInWithEmailAndPassword as W, sendSignInLinkToEmail as X, isSignInWithEmailLink as Y, signInWithEmailLink as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, sendEmailVerification as a0, verifyBeforeUpdateEmail as a1, ActionCodeURL as a2, parseActionCodeURL as a3, updateProfile as a4, updateEmail as a5, updatePassword as a6, getIdToken as a7, getIdTokenResult as a8, unlink as a9, _emulatorUrl as aA, _isChromeIOS as aB, _isFirefox as aC, _isIOSStandalone as aD, _isMobileBrowser as aE, _isSafari as aF, _isIOS as aG, _getRedirectResult as aH, _getRedirectUrl as aI, _setWindowLocation as aJ, AuthEventManager as aK, debugFail as aL, finalizeEnrollPhoneMfa as aM, _persistenceKeyName as aN, UserImpl as aO, _getInstance as aP, AuthImpl as aQ, _getClientVersion as aR, FetchProvider as aS, SAMLAuthCredential as aT, signInWithRedirect as aU, linkWithRedirect as aV, reauthenticateWithRedirect as aW, getAdditionalUserInfo as aa, reload as ab, getMultiFactorResolver as ac, multiFactor as ad, _performApiRequest as ae, _addTidIfNecessary as af, _createError as ag, _assert as ah, Delay as ai, _window as aj, _isHttpOrHttps as ak, _isWorker as al, _castAuth as am, sendPhoneVerificationCode as an, startEnrollPhoneMfa as ao, _assertLinkedStatus as ap, _link$1 as aq, debugAssert as ar, _generateEventId as as, AbstractPopupRedirectOperation as at, _assertInstanceOf as au, _withDefaultResolver as av, FederatedAuthProvider as aw, _fail as ax, _getProjectConfig as ay, _getCurrentUrl as az, _linkWithRedirect as b, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, onAuthStateChanged as h, initializeAuth as i, updateCurrentUser as j, signOut as k, deleteUser as l, debugErrorMap as m, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as n, onIdTokenChanged as o, prodErrorMap as p, connectAuthEmulator as q, registerAuth as r, setPersistence as s, AuthCredential as t, useDeviceLanguage as u, OAuthCredential as v, PhoneAuthCredential as w, inMemoryPersistence as x, EmailAuthProvider as y, FacebookAuthProvider as z };
9843
- //# sourceMappingURL=popup_redirect-93adefc5.js.map
9857
+ //# sourceMappingURL=popup_redirect-0aea9243.js.map