@firebase/auth 0.19.3 → 0.19.4

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 (66) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/auth-public.d.ts +1 -2
  3. package/dist/auth.d.ts +2 -3
  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-1cde31c6.js → popup_redirect-958a9598.js} +82 -48
  8. package/dist/cordova/popup_redirect-958a9598.js.map +1 -0
  9. package/dist/cordova/src/api/index.d.ts +2 -1
  10. package/dist/cordova/src/core/auth/auth_impl.d.ts +1 -1
  11. package/dist/cordova/src/model/auth.d.ts +1 -1
  12. package/dist/cordova/src/model/public_types.d.ts +1 -2
  13. package/dist/esm2017/{index-8593558d.js → index-839de510.js} +30 -16
  14. package/dist/esm2017/index-839de510.js.map +1 -0
  15. package/dist/esm2017/index.js +1 -1
  16. package/dist/esm2017/internal.js +2 -2
  17. package/dist/esm2017/src/api/index.d.ts +2 -1
  18. package/dist/esm2017/src/core/auth/auth_impl.d.ts +1 -1
  19. package/dist/esm2017/src/model/auth.d.ts +1 -1
  20. package/dist/esm2017/src/model/public_types.d.ts +1 -2
  21. package/dist/esm5/{index-4f7e1a18.js → index-26e00cb2.js} +89 -49
  22. package/dist/esm5/index-26e00cb2.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/api/index.d.ts +2 -1
  26. package/dist/esm5/src/core/auth/auth_impl.d.ts +1 -1
  27. package/dist/esm5/src/model/auth.d.ts +1 -1
  28. package/dist/esm5/src/model/public_types.d.ts +1 -2
  29. package/dist/index.webworker.esm5.js +81 -47
  30. package/dist/index.webworker.esm5.js.map +1 -1
  31. package/dist/node/{index-057dcc31.js → index-fe696f9c.js} +82 -48
  32. package/dist/node/index-fe696f9c.js.map +1 -0
  33. package/dist/node/index.js +1 -1
  34. package/dist/node/internal.js +1 -1
  35. package/dist/node/src/api/index.d.ts +2 -1
  36. package/dist/node/src/core/auth/auth_impl.d.ts +1 -1
  37. package/dist/node/src/model/auth.d.ts +1 -1
  38. package/dist/node/src/model/public_types.d.ts +1 -2
  39. package/dist/node-esm/{index-c327074d.js → index-62b96d71.js} +24 -15
  40. package/dist/node-esm/index-62b96d71.js.map +1 -0
  41. package/dist/node-esm/index.js +1 -1
  42. package/dist/node-esm/internal.js +2 -2
  43. package/dist/node-esm/src/api/index.d.ts +2 -1
  44. package/dist/node-esm/src/core/auth/auth_impl.d.ts +1 -1
  45. package/dist/node-esm/src/model/auth.d.ts +1 -1
  46. package/dist/node-esm/src/model/public_types.d.ts +1 -2
  47. package/dist/rn/index.js +1 -1
  48. package/dist/rn/internal.js +8 -2
  49. package/dist/rn/internal.js.map +1 -1
  50. package/dist/rn/{phone-4c7624c1.js → phone-1d904137.js} +82 -48
  51. package/dist/rn/phone-1d904137.js.map +1 -0
  52. package/dist/rn/src/api/index.d.ts +2 -1
  53. package/dist/rn/src/core/auth/auth_impl.d.ts +1 -1
  54. package/dist/rn/src/model/auth.d.ts +1 -1
  55. package/dist/rn/src/model/public_types.d.ts +1 -2
  56. package/dist/src/api/index.d.ts +2 -1
  57. package/dist/src/core/auth/auth_impl.d.ts +1 -1
  58. package/dist/src/model/auth.d.ts +1 -1
  59. package/dist/src/model/public_types.d.ts +1 -2
  60. package/package.json +4 -3
  61. package/dist/cordova/popup_redirect-1cde31c6.js.map +0 -1
  62. package/dist/esm2017/index-8593558d.js.map +0 -1
  63. package/dist/esm5/index-4f7e1a18.js.map +0 -1
  64. package/dist/node/index-057dcc31.js.map +0 -1
  65. package/dist/node-esm/index-c327074d.js.map +0 -1
  66. package/dist/rn/phone-4c7624c1.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-4f7e1a18.js';
1
+ export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-26e00cb2.js';
2
2
  import 'tslib';
3
3
  import '@firebase/util';
4
4
  import '@firebase/app';
@@ -1,5 +1,5 @@
1
- import { ao as _isAndroid, ap as _isIOS7Or8, aq as _isIOS, ar as _fail, as as _getRedirectUrl, at as debugAssert, au as _getProjectConfig, av as _createError, aw as _assert, ax as AuthEventManager, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as _clearRedirectOutcomes, a as browserSessionPersistence, aB as _getRedirectResult, aC as _castAuth } from './index-4f7e1a18.js';
2
- export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, aE as AuthImpl, aH as AuthPopup, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, aI as FetchProvider, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aJ as SAMLAuthCredential, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, aD as UserImpl, aw as _assert, aC as _castAuth, ar as _fail, aG as _generateEventId, aF as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, az as _persistenceKeyName, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-4f7e1a18.js';
1
+ import { ao as _isAndroid, ap as _isIOS7Or8, aq as _isIOS, ar as _fail, as as _getRedirectUrl, at as debugAssert, au as _getProjectConfig, av as _createError, aw as _assert, ax as AuthEventManager, ay as _getInstance, b as browserLocalPersistence, az as _persistenceKeyName, aA as _clearRedirectOutcomes, a as browserSessionPersistence, aB as _getRedirectResult, aC as _castAuth } from './index-26e00cb2.js';
2
+ export { A as ActionCodeOperation, ac as ActionCodeURL, G as AuthCredential, C as AuthErrorCodes, aE as AuthImpl, aH as AuthPopup, H as EmailAuthCredential, L as EmailAuthProvider, M as FacebookAuthProvider, F as FactorId, aI as FetchProvider, Q as GithubAuthProvider, N as GoogleAuthProvider, I as OAuthCredential, T as OAuthProvider, O as OperationType, J as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, o as ProviderId, R as RecaptchaVerifier, aJ as SAMLAuthCredential, U as SAMLAuthProvider, S as SignInMethod, V as TwitterAuthProvider, aD as UserImpl, aw as _assert, aC as _castAuth, ar as _fail, aG as _generateEventId, aF as _getClientVersion, ay as _getInstance, aB as _getRedirectResult, az as _persistenceKeyName, a1 as applyActionCode, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a2 as checkActionCode, a0 as confirmPasswordReset, E as connectAuthEmulator, a4 as createUserWithEmailAndPassword, z as debugErrorMap, y as deleteUser, a9 as fetchSignInMethodsForEmail, ak as getAdditionalUserInfo, n as getAuth, ah as getIdToken, ai as getIdTokenResult, am as getMultiFactorResolver, j as getRedirectResult, K as inMemoryPersistence, i as indexedDBLocalPersistence, D as initializeAuth, a7 as isSignInWithEmailLink, Y as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, an as multiFactor, t as onAuthStateChanged, q as onIdTokenChanged, ad as parseActionCodeURL, B as prodErrorMap, Z as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, al as reload, aa as sendEmailVerification, $ as sendPasswordResetEmail, a6 as sendSignInLinkToEmail, p as setPersistence, W as signInAnonymously, X as signInWithCredential, _ as signInWithCustomToken, a5 as signInWithEmailAndPassword, a8 as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, x as signOut, aj as unlink, w as updateCurrentUser, af as updateEmail, ag as updatePassword, u as updatePhoneNumber, ae as updateProfile, v as useDeviceLanguage, ab as verifyBeforeUpdateEmail, a3 as verifyPasswordResetCode } from './index-26e00cb2.js';
3
3
  import { __awaiter, __generator, __extends } from 'tslib';
4
4
  import { querystringDecode } from '@firebase/util';
5
5
  import '@firebase/app';
@@ -27,7 +27,8 @@ export declare const enum HttpMethod {
27
27
  export declare const enum HttpHeader {
28
28
  CONTENT_TYPE = "Content-Type",
29
29
  X_FIREBASE_LOCALE = "X-Firebase-Locale",
30
- X_CLIENT_VERSION = "X-Client-Version"
30
+ X_CLIENT_VERSION = "X-Client-Version",
31
+ X_FIREBASE_GMPID = "X-Firebase-gmpid"
31
32
  }
32
33
  export declare const enum Endpoint {
33
34
  CREATE_AUTH_URI = "/v1/accounts:createAuthUri",
@@ -95,7 +95,7 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
95
95
  private clientVersion;
96
96
  _logFramework(framework: string): void;
97
97
  _getFrameworks(): readonly string[];
98
- _getSdkClientVersion(): string;
98
+ _getAdditionalHeaders(): Promise<Record<string, string>>;
99
99
  }
100
100
  /**
101
101
  * Method to be used to cast down to our private implmentation of Auth.
@@ -63,7 +63,7 @@ export interface AuthInternal extends Auth {
63
63
  _getPersistence(): string;
64
64
  _logFramework(framework: string): void;
65
65
  _getFrameworks(): readonly string[];
66
- _getSdkClientVersion(): string;
66
+ _getAdditionalHeaders(): Promise<Record<string, string>>;
67
67
  readonly name: AppName;
68
68
  readonly config: ConfigInternal;
69
69
  languageCode: string | null;
@@ -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,
@@ -522,7 +522,7 @@ function _initializeAuthInstance(auth, deps) {
522
522
  }
523
523
 
524
524
  var name = "@firebase/auth";
525
- var version = "0.19.3";
525
+ var version = "0.19.4";
526
526
 
527
527
  /**
528
528
  * @license
@@ -980,30 +980,38 @@ function _addTidIfNecessary(auth, request) {
980
980
  function _performApiRequest(auth, method, path, request, customErrorMap) {
981
981
  if (customErrorMap === void 0) { customErrorMap = {}; }
982
982
  return __awaiter(this, void 0, void 0, function () {
983
+ var _this = this;
983
984
  return __generator(this, function (_a) {
984
- return [2 /*return*/, _performFetchWithErrorHandling(auth, customErrorMap, function () {
985
- var body = {};
986
- var params = {};
987
- if (request) {
988
- if (method === "GET" /* GET */) {
989
- params = request;
990
- }
991
- else {
992
- body = {
993
- body: JSON.stringify(request)
994
- };
985
+ return [2 /*return*/, _performFetchWithErrorHandling(auth, customErrorMap, function () { return __awaiter(_this, void 0, void 0, function () {
986
+ var body, params, query, headers;
987
+ return __generator(this, function (_a) {
988
+ switch (_a.label) {
989
+ case 0:
990
+ body = {};
991
+ params = {};
992
+ if (request) {
993
+ if (method === "GET" /* GET */) {
994
+ params = request;
995
+ }
996
+ else {
997
+ body = {
998
+ body: JSON.stringify(request)
999
+ };
1000
+ }
1001
+ }
1002
+ query = querystring(__assign({ key: auth.config.apiKey }, params)).slice(1);
1003
+ return [4 /*yield*/, auth._getAdditionalHeaders()];
1004
+ case 1:
1005
+ headers = _a.sent();
1006
+ headers["Content-Type" /* CONTENT_TYPE */] = 'application/json';
1007
+ if (auth.languageCode) {
1008
+ headers["X-Firebase-Locale" /* X_FIREBASE_LOCALE */] = auth.languageCode;
1009
+ }
1010
+ return [2 /*return*/, FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), __assign({ method: method,
1011
+ headers: headers, referrerPolicy: 'no-referrer' }, body))];
995
1012
  }
996
- }
997
- var query = querystring(__assign({ key: auth.config.apiKey }, params)).slice(1);
998
- var headers = new (FetchProvider.headers())();
999
- headers.set("Content-Type" /* CONTENT_TYPE */, 'application/json');
1000
- headers.set("X-Client-Version" /* X_CLIENT_VERSION */, auth._getSdkClientVersion());
1001
- if (auth.languageCode) {
1002
- headers.set("X-Firebase-Locale" /* X_FIREBASE_LOCALE */, auth.languageCode);
1003
- }
1004
- return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), __assign({ method: method,
1005
- headers: headers, referrerPolicy: 'no-referrer' }, body));
1006
- })];
1013
+ });
1014
+ }); })];
1007
1015
  });
1008
1016
  });
1009
1017
  }
@@ -1634,24 +1642,32 @@ function extractProviderData(providers) {
1634
1642
  function requestStsToken(auth, refreshToken) {
1635
1643
  return __awaiter(this, void 0, void 0, function () {
1636
1644
  var response;
1645
+ var _this = this;
1637
1646
  return __generator(this, function (_a) {
1638
1647
  switch (_a.label) {
1639
- case 0: return [4 /*yield*/, _performFetchWithErrorHandling(auth, {}, function () {
1640
- var body = querystring({
1641
- 'grant_type': 'refresh_token',
1642
- 'refresh_token': refreshToken
1643
- }).slice(1);
1644
- var _a = auth.config, tokenApiHost = _a.tokenApiHost, apiKey = _a.apiKey;
1645
- var url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* TOKEN */, "key=" + apiKey);
1646
- return FetchProvider.fetch()(url, {
1647
- method: "POST" /* POST */,
1648
- headers: {
1649
- 'X-Client-Version': auth._getSdkClientVersion(),
1650
- 'Content-Type': 'application/x-www-form-urlencoded'
1651
- },
1652
- body: body
1648
+ case 0: return [4 /*yield*/, _performFetchWithErrorHandling(auth, {}, function () { return __awaiter(_this, void 0, void 0, function () {
1649
+ var body, _a, tokenApiHost, apiKey, url, headers;
1650
+ return __generator(this, function (_b) {
1651
+ switch (_b.label) {
1652
+ case 0:
1653
+ body = querystring({
1654
+ 'grant_type': 'refresh_token',
1655
+ 'refresh_token': refreshToken
1656
+ }).slice(1);
1657
+ _a = auth.config, tokenApiHost = _a.tokenApiHost, apiKey = _a.apiKey;
1658
+ url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* TOKEN */, "key=" + apiKey);
1659
+ return [4 /*yield*/, auth._getAdditionalHeaders()];
1660
+ case 1:
1661
+ headers = _b.sent();
1662
+ headers["Content-Type" /* CONTENT_TYPE */] = 'application/x-www-form-urlencoded';
1663
+ return [2 /*return*/, FetchProvider.fetch()(url, {
1664
+ method: "POST" /* POST */,
1665
+ headers: headers,
1666
+ body: body
1667
+ })];
1668
+ }
1653
1669
  });
1654
- })];
1670
+ }); })];
1655
1671
  case 1:
1656
1672
  response = _a.sent();
1657
1673
  // The response comes back in snake_case. Convert to camel:
@@ -2377,13 +2393,19 @@ var AuthImpl = /** @class */ (function () {
2377
2393
  if (this._deleted) {
2378
2394
  return [2 /*return*/];
2379
2395
  }
2380
- if (!((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively)) return [3 /*break*/, 3];
2381
- return [4 /*yield*/, this._popupRedirectResolver._initialize(this)];
2396
+ if (!((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively)) return [3 /*break*/, 5];
2397
+ _d.label = 2;
2382
2398
  case 2:
2399
+ _d.trys.push([2, 4, , 5]);
2400
+ return [4 /*yield*/, this._popupRedirectResolver._initialize(this)];
2401
+ case 3:
2383
2402
  _d.sent();
2384
- _d.label = 3;
2385
- case 3: return [4 /*yield*/, this.initializeCurrentUser(popupRedirectResolver)];
2403
+ return [3 /*break*/, 5];
2386
2404
  case 4:
2405
+ _d.sent();
2406
+ return [3 /*break*/, 5];
2407
+ case 5: return [4 /*yield*/, this.initializeCurrentUser(popupRedirectResolver)];
2408
+ case 6:
2387
2409
  _d.sent();
2388
2410
  this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2389
2411
  if (this._deleted) {
@@ -2524,7 +2546,7 @@ var AuthImpl = /** @class */ (function () {
2524
2546
  };
2525
2547
  AuthImpl.prototype.reloadAndSetCurrentUserOrClear = function (user) {
2526
2548
  return __awaiter(this, void 0, void 0, function () {
2527
- var e_2;
2549
+ var e_3;
2528
2550
  return __generator(this, function (_a) {
2529
2551
  switch (_a.label) {
2530
2552
  case 0:
@@ -2534,8 +2556,8 @@ var AuthImpl = /** @class */ (function () {
2534
2556
  _a.sent();
2535
2557
  return [3 /*break*/, 3];
2536
2558
  case 2:
2537
- e_2 = _a.sent();
2538
- if (e_2.code !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2559
+ e_3 = _a.sent();
2560
+ if (e_3.code !== "auth/" + "network-request-failed" /* NETWORK_REQUEST_FAILED */) {
2539
2561
  // Something's wrong with the user's token. Log them out and remove
2540
2562
  // them from storage
2541
2563
  return [2 /*return*/, this.directlySetCurrentUser(null)];
@@ -2844,8 +2866,20 @@ var AuthImpl = /** @class */ (function () {
2844
2866
  AuthImpl.prototype._getFrameworks = function () {
2845
2867
  return this.frameworks;
2846
2868
  };
2847
- AuthImpl.prototype._getSdkClientVersion = function () {
2848
- return this.clientVersion;
2869
+ AuthImpl.prototype._getAdditionalHeaders = function () {
2870
+ return __awaiter(this, void 0, void 0, function () {
2871
+ var headers;
2872
+ var _a;
2873
+ return __generator(this, function (_b) {
2874
+ headers = (_a = {},
2875
+ _a["X-Client-Version" /* X_CLIENT_VERSION */] = this.clientVersion,
2876
+ _a);
2877
+ if (this.app.options.appId) {
2878
+ headers["X-Firebase-gmpid" /* X_FIREBASE_GMPID */] = this.app.options.appId;
2879
+ }
2880
+ return [2 /*return*/, headers];
2881
+ });
2882
+ });
2849
2883
  };
2850
2884
  return AuthImpl;
2851
2885
  }());