@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
@@ -2488,8 +2488,9 @@ function _getClientVersion(clientPlatform, frameworks) {
2488
2488
  * limitations under the License.
2489
2489
  */
2490
2490
  var AuthImpl = /** @class */ (function () {
2491
- function AuthImpl(app, config) {
2491
+ function AuthImpl(app, heartbeatServiceProvider, config) {
2492
2492
  this.app = app;
2493
+ this.heartbeatServiceProvider = heartbeatServiceProvider;
2493
2494
  this.config = config;
2494
2495
  this.currentUser = null;
2495
2496
  this.emulatorConfig = null;
@@ -3014,17 +3015,29 @@ var AuthImpl = /** @class */ (function () {
3014
3015
  return this.frameworks;
3015
3016
  };
3016
3017
  AuthImpl.prototype._getAdditionalHeaders = function () {
3018
+ var _a;
3017
3019
  return tslib.__awaiter(this, void 0, void 0, function () {
3018
- var headers;
3019
- var _a;
3020
- return tslib.__generator(this, function (_b) {
3021
- headers = (_a = {},
3022
- _a["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
3023
- _a);
3024
- if (this.app.options.appId) {
3025
- headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
3020
+ var headers, heartbeatsHeader;
3021
+ var _b;
3022
+ return tslib.__generator(this, function (_c) {
3023
+ switch (_c.label) {
3024
+ case 0:
3025
+ headers = (_b = {},
3026
+ _b["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
3027
+ _b);
3028
+ if (this.app.options.appId) {
3029
+ headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
3030
+ }
3031
+ return [4 /*yield*/, ((_a = this.heartbeatServiceProvider.getImmediate({
3032
+ optional: true,
3033
+ })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader())];
3034
+ case 1:
3035
+ heartbeatsHeader = _c.sent();
3036
+ if (heartbeatsHeader) {
3037
+ headers["X-Firebase-Client" /* X_FIREBASE_CLIENT */] = heartbeatsHeader;
3038
+ }
3039
+ return [2 /*return*/, headers];
3026
3040
  }
3027
- return [2 /*return*/, headers];
3028
3041
  });
3029
3042
  });
3030
3043
  };
@@ -6877,7 +6890,7 @@ function multiFactor(user) {
6877
6890
  }
6878
6891
 
6879
6892
  var name = "@firebase/auth";
6880
- var version = "0.19.9-canary.e987dac26";
6893
+ var version = "0.19.10";
6881
6894
 
6882
6895
  /**
6883
6896
  * @license
@@ -6997,8 +7010,9 @@ function registerAuth(clientPlatform) {
6997
7010
  app._registerComponent(new component.Component("auth" /* AUTH */, function (container, _a) {
6998
7011
  var deps = _a.options;
6999
7012
  var app = container.getProvider('app').getImmediate();
7013
+ var heartbeatServiceProvider = container.getProvider('heartbeat');
7000
7014
  var _b = app.options, apiKey = _b.apiKey, authDomain = _b.authDomain;
7001
- return (function (app) {
7015
+ return (function (app, heartbeatServiceProvider) {
7002
7016
  _assert(apiKey && !apiKey.includes(':'), "invalid-api-key" /* INVALID_API_KEY */, { appName: app.name });
7003
7017
  // Auth domain is optional if IdP sign in isn't being used
7004
7018
  _assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(':')), "argument-error" /* ARGUMENT_ERROR */, {
@@ -7013,10 +7027,10 @@ function registerAuth(clientPlatform) {
7013
7027
  apiScheme: "https" /* API_SCHEME */,
7014
7028
  sdkClientVersion: _getClientVersion(clientPlatform)
7015
7029
  };
7016
- var authInstance = new AuthImpl(app, config);
7030
+ var authInstance = new AuthImpl(app, heartbeatServiceProvider, config);
7017
7031
  _initializeAuthInstance(authInstance, deps);
7018
7032
  return authInstance;
7019
- })(app);
7033
+ })(app, heartbeatServiceProvider);
7020
7034
  }, "PUBLIC" /* PUBLIC */)
7021
7035
  /**
7022
7036
  * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()
@@ -7232,4 +7246,4 @@ exports.updateProfile = updateProfile;
7232
7246
  exports.useDeviceLanguage = useDeviceLanguage;
7233
7247
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
7234
7248
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
7235
- //# sourceMappingURL=index-b52d4a00.js.map
7249
+ //# sourceMappingURL=index-35c8d2ed.js.map