@firebase/auth 1.9.1 → 1.10.0

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 (130) hide show
  1. package/dist/auth-public.d.ts +28 -1
  2. package/dist/auth.d.ts +40 -2
  3. package/dist/browser-cjs/{index-018c7ebd.js → index-eddc1dc3.js} +211 -15
  4. package/dist/browser-cjs/index-eddc1dc3.js.map +1 -0
  5. package/dist/browser-cjs/index.d.ts +2 -1
  6. package/dist/browser-cjs/index.js +2 -1
  7. package/dist/browser-cjs/index.js.map +1 -1
  8. package/dist/browser-cjs/internal.js +2 -1
  9. package/dist/browser-cjs/internal.js.map +1 -1
  10. package/dist/browser-cjs/src/api/index.d.ts +1 -1
  11. package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +4 -1
  12. package/dist/browser-cjs/src/core/persistence/index.d.ts +2 -1
  13. package/dist/browser-cjs/src/model/auth.d.ts +4 -1
  14. package/dist/browser-cjs/src/model/public_types.d.ts +2 -1
  15. package/dist/browser-cjs/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  16. package/dist/browser-cjs/src/platform_node/index.d.ts +1 -0
  17. package/dist/cordova/auth-cordova-public.d.ts +26 -1
  18. package/dist/cordova/auth-cordova.d.ts +29 -2
  19. package/dist/cordova/index.d.ts +2 -1
  20. package/dist/cordova/index.js +2 -2
  21. package/dist/cordova/internal.js +147 -3
  22. package/dist/cordova/internal.js.map +1 -1
  23. package/dist/cordova/{popup_redirect-e795474a.js → popup_redirect-5323ec00.js} +66 -15
  24. package/dist/cordova/popup_redirect-5323ec00.js.map +1 -0
  25. package/dist/cordova/src/api/index.d.ts +1 -1
  26. package/dist/cordova/src/core/auth/auth_impl.d.ts +4 -1
  27. package/dist/cordova/src/core/persistence/index.d.ts +2 -1
  28. package/dist/cordova/src/model/auth.d.ts +4 -1
  29. package/dist/cordova/src/model/public_types.d.ts +2 -1
  30. package/dist/cordova/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  31. package/dist/cordova/src/platform_node/index.d.ts +1 -0
  32. package/dist/esm2017/{index-e84cf44d.js → index-c92d61ad.js} +211 -16
  33. package/dist/esm2017/index-c92d61ad.js.map +1 -0
  34. package/dist/esm2017/index.d.ts +2 -1
  35. package/dist/esm2017/index.js +1 -1
  36. package/dist/esm2017/internal.js +2 -2
  37. package/dist/esm2017/src/api/index.d.ts +1 -1
  38. package/dist/esm2017/src/core/auth/auth_impl.d.ts +4 -1
  39. package/dist/esm2017/src/core/persistence/index.d.ts +2 -1
  40. package/dist/esm2017/src/model/auth.d.ts +4 -1
  41. package/dist/esm2017/src/model/public_types.d.ts +2 -1
  42. package/dist/esm2017/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  43. package/dist/esm2017/src/platform_node/index.d.ts +1 -0
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.webworker.js +65 -14
  46. package/dist/index.webworker.js.map +1 -1
  47. package/dist/node/index.d.ts +2 -1
  48. package/dist/node/index.js +2 -1
  49. package/dist/node/index.js.map +1 -1
  50. package/dist/node/internal.js +2 -1
  51. package/dist/node/internal.js.map +1 -1
  52. package/dist/node/src/api/index.d.ts +1 -1
  53. package/dist/node/src/core/auth/auth_impl.d.ts +4 -1
  54. package/dist/node/src/core/persistence/index.d.ts +2 -1
  55. package/dist/node/src/model/auth.d.ts +4 -1
  56. package/dist/node/src/model/public_types.d.ts +2 -1
  57. package/dist/node/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  58. package/dist/node/src/platform_node/index.d.ts +1 -0
  59. package/dist/node/{totp-06fa6909.js → totp-af329771.js} +68 -15
  60. package/dist/node/totp-af329771.js.map +1 -0
  61. package/dist/node-esm/index.d.ts +2 -1
  62. package/dist/node-esm/index.js +1 -1
  63. package/dist/node-esm/internal.js +2 -2
  64. package/dist/node-esm/internal.js.map +1 -1
  65. package/dist/node-esm/src/api/index.d.ts +1 -1
  66. package/dist/node-esm/src/core/auth/auth_impl.d.ts +4 -1
  67. package/dist/node-esm/src/core/persistence/index.d.ts +2 -1
  68. package/dist/node-esm/src/model/auth.d.ts +4 -1
  69. package/dist/node-esm/src/model/public_types.d.ts +2 -1
  70. package/dist/node-esm/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  71. package/dist/node-esm/src/platform_node/index.d.ts +1 -0
  72. package/dist/node-esm/{totp-d5ff2369.js → totp-7829abf2.js} +68 -16
  73. package/dist/node-esm/totp-7829abf2.js.map +1 -0
  74. package/dist/rn/{index-ee081591.js → index-e8d5e0fb.js} +66 -15
  75. package/dist/rn/index-e8d5e0fb.js.map +1 -0
  76. package/dist/rn/index.d.ts +2 -1
  77. package/dist/rn/index.js +1 -1
  78. package/dist/rn/internal.js +146 -1
  79. package/dist/rn/internal.js.map +1 -1
  80. package/dist/rn/src/api/index.d.ts +1 -1
  81. package/dist/rn/src/core/auth/auth_impl.d.ts +4 -1
  82. package/dist/rn/src/core/persistence/index.d.ts +2 -1
  83. package/dist/rn/src/model/auth.d.ts +4 -1
  84. package/dist/rn/src/model/public_types.d.ts +2 -1
  85. package/dist/rn/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  86. package/dist/rn/src/platform_node/index.d.ts +1 -0
  87. package/dist/src/api/index.d.ts +1 -1
  88. package/dist/src/core/auth/auth_impl.d.ts +4 -1
  89. package/dist/src/core/persistence/index.d.ts +2 -1
  90. package/dist/src/model/auth.d.ts +4 -1
  91. package/dist/src/model/public_types.d.ts +2 -1
  92. package/dist/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  93. package/dist/src/platform_node/index.d.ts +1 -0
  94. package/dist/web-extension-cjs/index.d.ts +2 -1
  95. package/dist/web-extension-cjs/index.js +1 -1
  96. package/dist/web-extension-cjs/internal.js +146 -1
  97. package/dist/web-extension-cjs/internal.js.map +1 -1
  98. package/dist/web-extension-cjs/{register-c2c7670d.js → register-b64ddc5e.js} +66 -15
  99. package/dist/web-extension-cjs/register-b64ddc5e.js.map +1 -0
  100. package/dist/web-extension-cjs/src/api/index.d.ts +1 -1
  101. package/dist/web-extension-cjs/src/core/auth/auth_impl.d.ts +4 -1
  102. package/dist/web-extension-cjs/src/core/persistence/index.d.ts +2 -1
  103. package/dist/web-extension-cjs/src/model/auth.d.ts +4 -1
  104. package/dist/web-extension-cjs/src/model/public_types.d.ts +2 -1
  105. package/dist/web-extension-cjs/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  106. package/dist/web-extension-cjs/src/platform_node/index.d.ts +1 -0
  107. package/dist/web-extension-esm2017/auth-web-extension-public.d.ts +26 -1
  108. package/dist/web-extension-esm2017/auth-web-extension.d.ts +29 -2
  109. package/dist/web-extension-esm2017/index.d.ts +2 -1
  110. package/dist/web-extension-esm2017/index.js +2 -2
  111. package/dist/web-extension-esm2017/internal.js +147 -3
  112. package/dist/web-extension-esm2017/internal.js.map +1 -1
  113. package/dist/web-extension-esm2017/{register-31c228e4.js → register-00522d81.js} +66 -15
  114. package/dist/web-extension-esm2017/register-00522d81.js.map +1 -0
  115. package/dist/web-extension-esm2017/src/api/index.d.ts +1 -1
  116. package/dist/web-extension-esm2017/src/core/auth/auth_impl.d.ts +4 -1
  117. package/dist/web-extension-esm2017/src/core/persistence/index.d.ts +2 -1
  118. package/dist/web-extension-esm2017/src/model/auth.d.ts +4 -1
  119. package/dist/web-extension-esm2017/src/model/public_types.d.ts +2 -1
  120. package/dist/web-extension-esm2017/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  121. package/dist/web-extension-esm2017/src/platform_node/index.d.ts +1 -0
  122. package/package.json +3 -2
  123. package/dist/browser-cjs/index-018c7ebd.js.map +0 -1
  124. package/dist/cordova/popup_redirect-e795474a.js.map +0 -1
  125. package/dist/esm2017/index-e84cf44d.js.map +0 -1
  126. package/dist/node/totp-06fa6909.js.map +0 -1
  127. package/dist/node-esm/totp-d5ff2369.js.map +0 -1
  128. package/dist/rn/index-ee081591.js.map +0 -1
  129. package/dist/web-extension-cjs/register-c2c7670d.js.map +0 -1
  130. package/dist/web-extension-esm2017/register-31c228e4.js.map +0 -1
@@ -57,6 +57,8 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
57
57
  _tenantRecaptchaConfigs: Record<string, RecaptchaConfig>;
58
58
  _projectPasswordPolicy: PasswordPolicyInternal | null;
59
59
  _tenantPasswordPolicies: Record<string, PasswordPolicyInternal>;
60
+ _resolvePersistenceManagerAvailable: ((value: void | PromiseLike<void>) => void) | undefined;
61
+ _persistenceManagerAvailable: Promise<void>;
60
62
  readonly name: string;
61
63
  private lastNotifiedUid;
62
64
  languageCode: string | null;
@@ -82,7 +84,8 @@ export declare class AuthImpl implements AuthInternal, _FirebaseService {
82
84
  validatePassword(password: string): Promise<PasswordValidationStatus>;
83
85
  _getPasswordPolicyInternal(): PasswordPolicyInternal | null;
84
86
  _updatePasswordPolicy(): Promise<void>;
85
- _getPersistence(): string;
87
+ _getPersistenceType(): string;
88
+ _getPersistence(): PersistenceInternal;
86
89
  _updateErrorMap(errorMap: AuthErrorMap): void;
87
90
  onAuthStateChanged(nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
88
91
  beforeAuthStateChanged(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
@@ -18,7 +18,8 @@ import { Persistence } from '../../model/public_types';
18
18
  export declare const enum PersistenceType {
19
19
  SESSION = "SESSION",
20
20
  LOCAL = "LOCAL",
21
- NONE = "NONE"
21
+ NONE = "NONE",
22
+ COOKIE = "COOKIE"
22
23
  }
23
24
  export type PersistedBlob = Record<string, unknown>;
24
25
  export interface Instantiator<T> {
@@ -22,6 +22,7 @@ import { UserInternal } from './user';
22
22
  import { ClientPlatform } from '../core/util/version';
23
23
  import { RecaptchaConfig } from '../platform_browser/recaptcha/recaptcha';
24
24
  import { PasswordPolicyInternal } from './password_policy';
25
+ import { PersistenceInternal } from '../core/persistence';
25
26
  export type AppName = string;
26
27
  export type ApiKey = string;
27
28
  export type AuthDomain = string;
@@ -56,6 +57,7 @@ export interface AuthInternal extends Auth {
56
57
  _canInitEmulator: boolean;
57
58
  _isInitialized: boolean;
58
59
  _initializationPromise: Promise<void> | null;
60
+ _persistenceManagerAvailable: Promise<void>;
59
61
  _updateCurrentUser(user: UserInternal | null): Promise<void>;
60
62
  _onStorageEvent(): void;
61
63
  _notifyListenersIfCurrent(user: UserInternal): void;
@@ -66,7 +68,8 @@ export interface AuthInternal extends Auth {
66
68
  _key(): string;
67
69
  _startProactiveRefresh(): void;
68
70
  _stopProactiveRefresh(): void;
69
- _getPersistence(): string;
71
+ _getPersistenceType(): string;
72
+ _getPersistence(): PersistenceInternal;
70
73
  _getRecaptchaConfig(): RecaptchaConfig | null;
71
74
  _getPasswordPolicyInternal(): PasswordPolicyInternal | null;
72
75
  _updatePasswordPolicy(): Promise<void>;
@@ -305,8 +305,9 @@ export interface Persistence {
305
305
  * - 'SESSION' is used for temporary persistence such as `sessionStorage`.
306
306
  * - 'LOCAL' is used for long term persistence such as `localStorage` or `IndexedDB`.
307
307
  * - 'NONE' is used for in-memory, or no persistence.
308
+ * - 'COOKIE' is used for cookie persistence, useful for server-side rendering.
308
309
  */
309
- readonly type: 'SESSION' | 'LOCAL' | 'NONE';
310
+ readonly type: 'SESSION' | 'LOCAL' | 'NONE' | 'COOKIE';
310
311
  }
311
312
  /**
312
313
  * Interface representing ID token result obtained from {@link User.getIdTokenResult}.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { Persistence } from '../../model/public_types';
18
+ import { PersistenceInternal, PersistenceType, PersistenceValue, StorageEventListener } from '../../core/persistence';
19
+ export declare class CookiePersistence implements PersistenceInternal {
20
+ static type: 'COOKIE';
21
+ readonly type = PersistenceType.COOKIE;
22
+ listenerUnsubscribes: Map<StorageEventListener, () => void>;
23
+ _getFinalTarget(originalUrl: string): URL | string;
24
+ _isAvailable(): Promise<boolean>;
25
+ _set(_key: string, _value: PersistenceValue): Promise<void>;
26
+ _get<T extends PersistenceValue>(key: string): Promise<T | null>;
27
+ _remove(key: string): Promise<void>;
28
+ _addListener(key: string, listener: StorageEventListener): void;
29
+ _removeListener(_key: string, listener: StorageEventListener): void;
30
+ }
31
+ /**
32
+ * An implementation of {@link Persistence} of type `COOKIE`, for use on the client side in
33
+ * applications leveraging hybrid rendering and middleware.
34
+ *
35
+ * @remarks This persistence method requires companion middleware to function, such as that provided
36
+ * by {@link https://firebaseopensource.com/projects/firebaseextended/reactfire/ | ReactFire} for
37
+ * NextJS.
38
+ * @beta
39
+ */
40
+ export declare const browserCookiePersistence: Persistence;
@@ -28,6 +28,7 @@ declare class FailClass {
28
28
  }
29
29
  export declare const browserLocalPersistence: import("../model/public_types").Persistence;
30
30
  export declare const browserSessionPersistence: import("../model/public_types").Persistence;
31
+ export declare const browserCookiePersistence: import("../model/public_types").Persistence;
31
32
  export declare const indexedDBLocalPersistence: import("../model/public_types").Persistence;
32
33
  export declare const browserPopupRedirectResolver: import("@firebase/app").FirebaseError;
33
34
  export declare const PhoneAuthProvider: typeof FailClass;
@@ -859,6 +859,14 @@ const SERVER_ERROR_MAP = {
859
859
  * See the License for the specific language governing permissions and
860
860
  * limitations under the License.
861
861
  */
862
+ const CookieAuthProxiedEndpoints = [
863
+ "/v1/accounts:signInWithCustomToken" /* Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN */,
864
+ "/v1/accounts:signInWithEmailLink" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */,
865
+ "/v1/accounts:signInWithIdp" /* Endpoint.SIGN_IN_WITH_IDP */,
866
+ "/v1/accounts:signInWithPassword" /* Endpoint.SIGN_IN_WITH_PASSWORD */,
867
+ "/v1/accounts:signInWithPhoneNumber" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */,
868
+ "/v1/token" /* Endpoint.TOKEN */
869
+ ];
862
870
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
863
871
  function _addTidIfNecessary(auth, request) {
864
872
  if (auth.tenantId && !request.tenantId) {
@@ -895,7 +903,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
895
903
  if (!isCloudflareWorker()) {
896
904
  fetchArgs.referrerPolicy = 'no-referrer';
897
905
  }
898
- return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), fetchArgs);
906
+ return FetchProvider.fetch()(await _getFinalTarget(auth, auth.config.apiHost, path, query), fetchArgs);
899
907
  });
900
908
  }
901
909
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
@@ -960,12 +968,25 @@ async function _performSignInRequest(auth, method, path, request, customErrorMap
960
968
  }
961
969
  return serverResponse;
962
970
  }
963
- function _getFinalTarget(auth, host, path, query) {
971
+ async function _getFinalTarget(auth, host, path, query) {
964
972
  const base = `${host}${path}?${query}`;
965
- if (!auth.config.emulator) {
966
- return `${auth.config.apiScheme}://${base}`;
967
- }
968
- return _emulatorUrl(auth.config, base);
973
+ const authInternal = auth;
974
+ const finalTarget = authInternal.config.emulator
975
+ ? _emulatorUrl(auth.config, base)
976
+ : `${auth.config.apiScheme}://${base}`;
977
+ // Cookie auth works by MiTMing the signIn and token endpoints from the developer's backend,
978
+ // saving the idToken and refreshToken into cookies, and then redacting the refreshToken
979
+ // from the response
980
+ if (CookieAuthProxiedEndpoints.includes(path)) {
981
+ // Persistence manager is async, we need to await it. We can't just wait for auth initialized
982
+ // here since auth initialization calls this function.
983
+ await authInternal._persistenceManagerAvailable;
984
+ if (authInternal._getPersistenceType() === "COOKIE" /* PersistenceType.COOKIE */) {
985
+ const cookiePersistence = authInternal._getPersistence();
986
+ return cookiePersistence._getFinalTarget(finalTarget).toString();
987
+ }
988
+ }
989
+ return finalTarget;
969
990
  }
970
991
  function _parseEnforcementState(enforcementStateStr) {
971
992
  switch (enforcementStateStr) {
@@ -1534,7 +1555,7 @@ async function requestStsToken(auth, refreshToken) {
1534
1555
  'refresh_token': refreshToken
1535
1556
  }).slice(1);
1536
1557
  const { tokenApiHost, apiKey } = auth.config;
1537
- const url = _getFinalTarget(auth, tokenApiHost, "/v1/token" /* Endpoint.TOKEN */, `key=${apiKey}`);
1558
+ const url = await _getFinalTarget(auth, tokenApiHost, "/v1/token" /* Endpoint.TOKEN */, `key=${apiKey}`);
1538
1559
  const headers = await auth._getAdditionalHeaders();
1539
1560
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/x-www-form-urlencoded';
1540
1561
  return FetchProvider.fetch()(url, {
@@ -2025,7 +2046,17 @@ class PersistenceUserManager {
2025
2046
  }
2026
2047
  async getCurrentUser() {
2027
2048
  const blob = await this.persistence._get(this.fullUserKey);
2028
- return blob ? UserImpl._fromJSON(this.auth, blob) : null;
2049
+ if (!blob) {
2050
+ return null;
2051
+ }
2052
+ if (typeof blob === 'string') {
2053
+ const response = await getAccountInfo(this.auth, { idToken: blob }).catch(() => undefined);
2054
+ if (!response) {
2055
+ return null;
2056
+ }
2057
+ return UserImpl._fromGetAccountInfoResponse(this.auth, response, blob);
2058
+ }
2059
+ return UserImpl._fromJSON(this.auth, blob);
2029
2060
  }
2030
2061
  removeCurrentUser() {
2031
2062
  return this.persistence._remove(this.fullUserKey);
@@ -2072,7 +2103,19 @@ class PersistenceUserManager {
2072
2103
  try {
2073
2104
  const blob = await persistence._get(key);
2074
2105
  if (blob) {
2075
- const user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)
2106
+ let user;
2107
+ if (typeof blob === 'string') {
2108
+ const response = await getAccountInfo(auth, {
2109
+ idToken: blob
2110
+ }).catch(() => undefined);
2111
+ if (!response) {
2112
+ break;
2113
+ }
2114
+ user = await UserImpl._fromGetAccountInfoResponse(auth, response, blob);
2115
+ }
2116
+ else {
2117
+ user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)
2118
+ }
2076
2119
  if (persistence !== selectedPersistence) {
2077
2120
  userToMigrate = user;
2078
2121
  }
@@ -2566,6 +2609,7 @@ class AuthImpl {
2566
2609
  this._tenantRecaptchaConfigs = {};
2567
2610
  this._projectPasswordPolicy = null;
2568
2611
  this._tenantPasswordPolicies = {};
2612
+ this._resolvePersistenceManagerAvailable = undefined;
2569
2613
  // Tracks the last notified UID for state change listeners to prevent
2570
2614
  // repeated calls to the callbacks. Undefined means it's never been
2571
2615
  // called, whereas null means it's been called with a signed out user
@@ -2576,6 +2620,9 @@ class AuthImpl {
2576
2620
  this.frameworks = [];
2577
2621
  this.name = app.name;
2578
2622
  this.clientVersion = config.sdkClientVersion;
2623
+ // TODO(jamesdaniels) explore less hacky way to do this, cookie authentication needs
2624
+ // persistenceMananger to be available. see _getFinalTarget for more context
2625
+ this._persistenceManagerAvailable = new Promise(resolve => (this._resolvePersistenceManagerAvailable = resolve));
2579
2626
  }
2580
2627
  _initializeWithPersistence(persistenceHierarchy, popupRedirectResolver) {
2581
2628
  if (popupRedirectResolver) {
@@ -2584,17 +2631,18 @@ class AuthImpl {
2584
2631
  // Have to check for app deletion throughout initialization (after each
2585
2632
  // promise resolution)
2586
2633
  this._initializationPromise = this.queue(async () => {
2587
- var _a, _b;
2634
+ var _a, _b, _c;
2588
2635
  if (this._deleted) {
2589
2636
  return;
2590
2637
  }
2591
2638
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
2639
+ (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
2592
2640
  if (this._deleted) {
2593
2641
  return;
2594
2642
  }
2595
2643
  // Initialize the resolver early if necessary (only applicable to web:
2596
2644
  // this will cause the iframe to load immediately in certain cases)
2597
- if ((_a = this._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {
2645
+ if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
2598
2646
  // If this fails, don't halt auth loading
2599
2647
  try {
2600
2648
  await this._popupRedirectResolver._initialize(this);
@@ -2604,7 +2652,7 @@ class AuthImpl {
2604
2652
  }
2605
2653
  }
2606
2654
  await this.initializeCurrentUser(popupRedirectResolver);
2607
- this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;
2655
+ this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2608
2656
  if (this._deleted) {
2609
2657
  return;
2610
2658
  }
@@ -2858,9 +2906,12 @@ class AuthImpl {
2858
2906
  this._tenantPasswordPolicies[this.tenantId] = passwordPolicy;
2859
2907
  }
2860
2908
  }
2861
- _getPersistence() {
2909
+ _getPersistenceType() {
2862
2910
  return this.assertedPersistence.persistence.type;
2863
2911
  }
2912
+ _getPersistence() {
2913
+ return this.assertedPersistence.persistence;
2914
+ }
2864
2915
  _updateErrorMap(errorMap) {
2865
2916
  this._errorFactory = new ErrorFactory('auth', 'Firebase', errorMap());
2866
2917
  }
@@ -7079,7 +7130,7 @@ function multiFactor(user) {
7079
7130
  }
7080
7131
 
7081
7132
  var name = "@firebase/auth";
7082
- var version = "1.9.1";
7133
+ var version = "1.10.0";
7083
7134
 
7084
7135
  /**
7085
7136
  * @license
@@ -7281,6 +7332,7 @@ class FailClass {
7281
7332
  }
7282
7333
  const browserLocalPersistence = inMemoryPersistence;
7283
7334
  const browserSessionPersistence = inMemoryPersistence;
7335
+ const browserCookiePersistence = inMemoryPersistence;
7284
7336
  const indexedDBLocalPersistence = inMemoryPersistence;
7285
7337
  const browserPopupRedirectResolver = NOT_AVAILABLE_ERROR;
7286
7338
  const PhoneAuthProvider = FailClass;
@@ -7490,5 +7542,5 @@ function _isEmptyString(input) {
7490
7542
  return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
7491
7543
  }
7492
7544
 
7493
- export { TwitterAuthProvider as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, revokeAccessToken as D, deleteUser as E, FactorId as F, debugErrorMap as G, prodErrorMap as H, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as I, initializeAuth as J, connectAuthEmulator as K, AuthCredential as L, EmailAuthCredential as M, OAuthCredential as N, OperationType as O, PhoneAuthProvider as P, PhoneAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, inMemoryPersistence as U, EmailAuthProvider as V, FacebookAuthProvider as W, GoogleAuthProvider as X, GithubAuthProvider as Y, OAuthProvider as Z, SAMLAuthProvider as _, browserSessionPersistence as a, signInAnonymously as a0, signInWithCredential as a1, linkWithCredential as a2, reauthenticateWithCredential as a3, signInWithCustomToken as a4, sendPasswordResetEmail as a5, confirmPasswordReset as a6, applyActionCode as a7, checkActionCode as a8, verifyPasswordResetCode as a9, _fail as aA, debugAssert as aB, _persistenceKeyName as aC, _serverAppCurrentUserOperationNotSupportedError as aD, _castAuth as aE, FederatedAuthProvider as aF, BaseOAuthProvider as aG, _emulatorUrl as aH, _performApiRequest as aI, _isIOS as aJ, _isAndroid as aK, _isIOS7Or8 as aL, _createError as aM, _isMobileBrowser as aN, _isIE10 as aO, UserImpl as aP, AuthImpl as aQ, _getClientVersion as aR, FetchProvider as aS, SAMLAuthCredential as aT, createUserWithEmailAndPassword as aa, signInWithEmailAndPassword as ab, sendSignInLinkToEmail as ac, isSignInWithEmailLink as ad, signInWithEmailLink as ae, fetchSignInMethodsForEmail as af, sendEmailVerification as ag, verifyBeforeUpdateEmail as ah, ActionCodeURL as ai, parseActionCodeURL as aj, updateProfile as ak, updateEmail as al, updatePassword as am, getIdToken as an, getIdTokenResult as ao, unlink as ap, getAdditionalUserInfo as aq, reload as ar, getMultiFactorResolver as as, multiFactor as at, _getInstance as au, _assert as av, _signInWithCredential as aw, _reauthenticate as ax, _link as ay, signInWithIdp 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, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };
7494
- //# sourceMappingURL=totp-d5ff2369.js.map
7545
+ export { SAMLAuthProvider as $, ActionCodeOperation as A, useDeviceLanguage as B, updateCurrentUser as C, signOut as D, revokeAccessToken as E, FactorId as F, deleteUser as G, debugErrorMap as H, prodErrorMap as I, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as J, initializeAuth as K, connectAuthEmulator as L, AuthCredential as M, EmailAuthCredential as N, OperationType as O, PhoneAuthProvider as P, OAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, PhoneAuthCredential as U, inMemoryPersistence as V, EmailAuthProvider as W, FacebookAuthProvider as X, GoogleAuthProvider as Y, GithubAuthProvider as Z, OAuthProvider as _, browserCookiePersistence as a, TwitterAuthProvider as a0, signInAnonymously as a1, signInWithCredential as a2, linkWithCredential as a3, reauthenticateWithCredential as a4, signInWithCustomToken as a5, sendPasswordResetEmail as a6, confirmPasswordReset as a7, applyActionCode as a8, checkActionCode as a9, signInWithIdp as aA, _fail as aB, debugAssert as aC, _persistenceKeyName as aD, _serverAppCurrentUserOperationNotSupportedError as aE, _castAuth as aF, FederatedAuthProvider as aG, BaseOAuthProvider as aH, _emulatorUrl as aI, _performApiRequest as aJ, _isIOS as aK, _isAndroid as aL, _isIOS7Or8 as aM, _createError as aN, _isMobileBrowser as aO, _isIE10 as aP, UserImpl as aQ, AuthImpl as aR, _getClientVersion as aS, FetchProvider as aT, SAMLAuthCredential as aU, verifyPasswordResetCode as aa, createUserWithEmailAndPassword as ab, signInWithEmailAndPassword as ac, sendSignInLinkToEmail as ad, isSignInWithEmailLink as ae, signInWithEmailLink as af, fetchSignInMethodsForEmail as ag, sendEmailVerification as ah, verifyBeforeUpdateEmail as ai, ActionCodeURL as aj, parseActionCodeURL as ak, updateProfile as al, updateEmail as am, updatePassword as an, getIdToken as ao, getIdTokenResult as ap, unlink as aq, getAdditionalUserInfo as ar, reload as as, getMultiFactorResolver as at, multiFactor as au, _getInstance as av, _assert as aw, _signInWithCredential as ax, _reauthenticate as ay, _link as az, browserLocalPersistence as b, browserSessionPersistence as c, signInWithPopup as d, linkWithPopup as e, reauthenticateWithPopup as f, signInWithRedirect as g, linkWithRedirect as h, indexedDBLocalPersistence as i, reauthenticateWithRedirect as j, getRedirectResult as k, linkWithPhoneNumber as l, browserPopupRedirectResolver as m, PhoneMultiFactorGenerator as n, TotpSecret as o, getAuth as p, ProviderId as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, setPersistence as t, updatePhoneNumber as u, initializeRecaptchaConfig as v, validatePassword as w, onIdTokenChanged as x, beforeAuthStateChanged as y, onAuthStateChanged as z };
7546
+ //# sourceMappingURL=totp-7829abf2.js.map