@firebase/auth 1.12.2 → 1.13.0-20260408201731

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/dist/browser-cjs/{index-e6fab08e.js → index-eb16a0d1.js} +2 -2
  2. package/dist/browser-cjs/{index-e6fab08e.js.map → index-eb16a0d1.js.map} +1 -1
  3. package/dist/browser-cjs/index.js +1 -1
  4. package/dist/browser-cjs/internal.js +1 -1
  5. package/dist/browser-cjs/src/platform_react_native/persistence/react_native.d.ts +20 -1
  6. package/dist/cordova/index.js +2 -2
  7. package/dist/cordova/internal.js +2 -2
  8. package/dist/cordova/{popup_redirect-5ec7b405.js → popup_redirect-8d67604d.js} +2 -2
  9. package/dist/cordova/{popup_redirect-5ec7b405.js.map → popup_redirect-8d67604d.js.map} +1 -1
  10. package/dist/cordova/src/platform_react_native/persistence/react_native.d.ts +20 -1
  11. package/dist/esm/{index-dfb5c973.js → index-40752d96.js} +2 -2
  12. package/dist/esm/{index-dfb5c973.js.map → index-40752d96.js.map} +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/internal.js +2 -2
  15. package/dist/esm/src/platform_react_native/persistence/react_native.d.ts +20 -1
  16. package/dist/index.webworker.js +1 -1
  17. package/dist/node/index.js +1 -1
  18. package/dist/node/internal.js +1 -1
  19. package/dist/node/src/platform_react_native/persistence/react_native.d.ts +20 -1
  20. package/dist/node/{totp-a5322a96.js → totp-929d8284.js} +2 -2
  21. package/dist/node/{totp-a5322a96.js.map → totp-929d8284.js.map} +1 -1
  22. package/dist/node-esm/index.js +1 -1
  23. package/dist/node-esm/internal.js +2 -2
  24. package/dist/node-esm/src/platform_react_native/persistence/react_native.d.ts +20 -1
  25. package/dist/node-esm/{totp-ed01b91b.js → totp-c0564291.js} +2 -2
  26. package/dist/node-esm/{totp-ed01b91b.js.map → totp-c0564291.js.map} +1 -1
  27. package/dist/rn/{index-e23bd279.js → index-446db0d6.js} +2 -2
  28. package/dist/rn/{index-e23bd279.js.map → index-446db0d6.js.map} +1 -1
  29. package/dist/rn/index.js +34 -3
  30. package/dist/rn/index.js.map +1 -1
  31. package/dist/rn/internal.js +1 -1
  32. package/dist/rn/src/platform_react_native/persistence/react_native.d.ts +20 -1
  33. package/dist/src/platform_react_native/persistence/react_native.d.ts +20 -1
  34. package/dist/web-extension-cjs/index.js +1 -1
  35. package/dist/web-extension-cjs/internal.js +1 -1
  36. package/dist/web-extension-cjs/{register-a20238ea.js → register-4a6573e8.js} +2 -2
  37. package/dist/web-extension-cjs/{register-a20238ea.js.map → register-4a6573e8.js.map} +1 -1
  38. package/dist/web-extension-cjs/src/platform_react_native/persistence/react_native.d.ts +20 -1
  39. package/dist/web-extension-esm/index.js +2 -2
  40. package/dist/web-extension-esm/internal.js +2 -2
  41. package/dist/web-extension-esm/{register-27e07cc8.js → register-9bf52823.js} +2 -2
  42. package/dist/web-extension-esm/{register-27e07cc8.js.map → register-9bf52823.js.map} +1 -1
  43. package/dist/web-extension-esm/src/platform_react_native/persistence/react_native.d.ts +20 -1
  44. package/package.json +2 -2
package/dist/rn/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var app = require('@firebase/app');
6
- var index = require('./index-e23bd279.js');
6
+ var index = require('./index-446db0d6.js');
7
7
  require('@firebase/util');
8
8
  require('@firebase/component');
9
9
  require('@firebase/logger');
@@ -26,9 +26,28 @@ require('@firebase/logger');
26
26
  */
27
27
  /**
28
28
  * Returns a persistence object that wraps `AsyncStorage` imported from
29
- * `react-native` or `@react-native-community/async-storage`, and can
29
+ * `react-native` or `@react-native-async-storage/async-storage`, and can
30
30
  * be used in the persistence dependency field in {@link initializeAuth}.
31
31
  *
32
+ * @example
33
+ * ```javascript
34
+ * import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
35
+ *
36
+ * // For @react-native-async-storage/async-storage v3:
37
+ * import { createAsyncStorage } from '@react-native-async-storage/async-storage';
38
+ * const appStorage = createAsyncStorage('app');
39
+ * const persistence = getReactNativePersistence(appStorage);
40
+ *
41
+ * // For @react-native-async-storage/async-storage v2:
42
+ * // import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';
43
+ * // const persistence = getReactNativePersistence(ReactNativeAsyncStorage);
44
+ *
45
+ * // Then, initialize auth:
46
+ * const auth = initializeAuth(app, {
47
+ * persistence
48
+ * });
49
+ * ```
50
+ *
32
51
  * @public
33
52
  */
34
53
  function getReactNativePersistence(storage) {
@@ -103,9 +122,21 @@ persist between sessions. In order to persist auth state, install the package
103
122
  initializeAuth:
104
123
 
105
124
  import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
125
+
126
+ // For @react-native-async-storage/async-storage v3:
127
+ import { createAsyncStorage } from '@react-native-async-storage/async-storage';
128
+ const appStorage = createAsyncStorage("app");
129
+ const persistence = getReactNativePersistence(appStorage);
130
+
131
+ /*
132
+ // For @react-native-async-storage/async-storage v2:
106
133
  import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';
134
+ const persistence = getReactNativePersistence(ReactNativeAsyncStorage);
135
+ */
136
+
137
+ // Then, initialize auth:
107
138
  const auth = initializeAuth(app, {
108
- persistence: getReactNativePersistence(ReactNativeAsyncStorage)
139
+ persistence
109
140
  });
110
141
  `;
111
142
  function getAuth(app$1 = app.getApp()) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/platform_react_native/persistence/react_native.ts","../../index.rn.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Persistence, ReactNativeAsyncStorage } from '../../model/public_types';\n\nimport {\n PersistenceInternal,\n PersistenceType,\n PersistenceValue,\n STORAGE_AVAILABLE_KEY,\n StorageEventListener\n} from '../../core/persistence';\n\n/**\n * Returns a persistence object that wraps `AsyncStorage` imported from\n * `react-native` or `@react-native-community/async-storage`, and can\n * be used in the persistence dependency field in {@link initializeAuth}.\n *\n * @public\n */\nexport function getReactNativePersistence(\n storage: ReactNativeAsyncStorage\n): Persistence {\n // In the _getInstance() implementation (see src/core/persistence/index.ts),\n // we expect each \"externs.Persistence\" object passed to us by the user to\n // be able to be instantiated (as a class) using \"new\". That function also\n // expects the constructor to be empty. Since ReactNativeStorage requires the\n // underlying storage layer, we need to be able to create subclasses\n // (closures, essentially) that have the storage layer but empty constructor.\n return class implements PersistenceInternal {\n static type: 'LOCAL' = 'LOCAL';\n readonly type: PersistenceType = PersistenceType.LOCAL;\n\n async _isAvailable(): Promise<boolean> {\n try {\n if (!storage) {\n return false;\n }\n await storage.setItem(STORAGE_AVAILABLE_KEY, '1');\n await storage.removeItem(STORAGE_AVAILABLE_KEY);\n return true;\n } catch {\n return false;\n }\n }\n\n _set(key: string, value: PersistenceValue): Promise<void> {\n return storage.setItem(key, JSON.stringify(value));\n }\n\n async _get<T extends PersistenceValue>(key: string): Promise<T | null> {\n const json = await storage.getItem(key);\n return json ? JSON.parse(json) : null;\n }\n\n _remove(key: string): Promise<void> {\n return storage.removeItem(key);\n }\n\n _addListener(_key: string, _listener: StorageEventListener): void {\n // Listeners are not supported for React Native storage.\n return;\n }\n\n _removeListener(_key: string, _listener: StorageEventListener): void {\n // Listeners are not supported for React Native storage.\n return;\n }\n };\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * This is the file that people using React Native will actually import. You\n * should only include this file if you have something specific about your\n * implementation that mandates having a separate entrypoint. Otherwise you can\n * just use index.ts\n */\n\nimport { FirebaseApp, getApp, _getProvider } from '@firebase/app';\nimport { Auth, Dependencies } from './src/model/public_types';\n\nimport { initializeAuth as initializeAuthOriginal } from './src';\nimport { registerAuth } from './src/core/auth/register';\nimport { ClientPlatform } from './src/core/util/version';\nimport { _logWarn } from './src/core/util/log';\n\n// Core functionality shared by all clients\nexport * from './index.shared';\n\n// Export some Phone symbols\n// providers\nexport { PhoneAuthProvider } from './src/platform_browser/providers/phone';\n\n// strategies\nexport {\n signInWithPhoneNumber,\n linkWithPhoneNumber,\n reauthenticateWithPhoneNumber,\n updatePhoneNumber\n} from './src/platform_browser/strategies/phone';\n\n// MFA\nexport { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';\nexport {\n TotpMultiFactorGenerator,\n TotpSecret\n} from './src/mfa/assertions/totp';\n\nexport { getReactNativePersistence } from './src/platform_react_native/persistence/react_native';\n\nconst NO_PERSISTENCE_WARNING = `\nYou are initializing Firebase Auth for React Native without providing\nAsyncStorage. Auth state will default to memory persistence and will not\npersist between sessions. In order to persist auth state, install the package\n\"@react-native-async-storage/async-storage\" and provide it to\ninitializeAuth:\n\nimport { initializeAuth, getReactNativePersistence } from 'firebase/auth';\nimport ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';\nconst auth = initializeAuth(app, {\n persistence: getReactNativePersistence(ReactNativeAsyncStorage)\n});\n`;\n\nexport function getAuth(app: FirebaseApp = getApp()): Auth {\n const provider = _getProvider(app, 'auth');\n\n if (provider.isInitialized()) {\n return provider.getImmediate();\n }\n\n // Only warn if getAuth() is called before initializeAuth()\n _logWarn(NO_PERSISTENCE_WARNING);\n\n return initializeAuthOriginal(app);\n}\n\n/**\n * Wrapper around base `initializeAuth()` for RN users only, which\n * shows the warning message if no persistence is provided.\n * Double-checked potential collision with `export * from './index.shared'`\n * as `./index.shared` also exports `initializeAuth()`, and the final\n * bundle does correctly export only this `initializeAuth()` function\n * and not the one from index.shared.\n */\nexport function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth {\n if (!deps?.persistence) {\n _logWarn(NO_PERSISTENCE_WARNING);\n }\n return initializeAuthOriginal(app, deps);\n}\n\nregisterAuth(ClientPlatform.REACT_NATIVE);\n"],"names":["STORAGE_AVAILABLE_KEY","app","getApp","_getProvider","_logWarn","initializeAuthOriginal","registerAuth"],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAYH;;;;;;AAMG;AACG,SAAU,yBAAyB,CACvC,OAAgC,EAAA;;;;;;;;IAQhC,OAAO,EAAA,GAAA,MAAA;AAAA,YAAA,WAAA,GAAA;AAEI,gBAAA,IAAA,CAAA,IAAI,GAA0C,OAAA,6BAAA;aAqCxD;AAnCC,YAAA,MAAM,YAAY,GAAA;AAChB,gBAAA,IAAI;oBACF,IAAI,CAAC,OAAO,EAAE;AACZ,wBAAA,OAAO,KAAK,CAAC;qBACd;oBACD,MAAM,OAAO,CAAC,OAAO,CAACA,2BAAqB,EAAE,GAAG,CAAC,CAAC;AAClD,oBAAA,MAAM,OAAO,CAAC,UAAU,CAACA,2BAAqB,CAAC,CAAC;AAChD,oBAAA,OAAO,IAAI,CAAC;iBACb;AAAC,gBAAA,MAAM;AACN,oBAAA,OAAO,KAAK,CAAC;iBACd;aACF;YAED,IAAI,CAAC,GAAW,EAAE,KAAuB,EAAA;AACvC,gBAAA,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;aACpD;YAED,MAAM,IAAI,CAA6B,GAAW,EAAA;gBAChD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACxC,gBAAA,OAA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../index.rn.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Persistence, ReactNativeAsyncStorage } from '../../model/public_types';\n\nimport {\n PersistenceInternal,\n PersistenceType,\n PersistenceValue,\n STORAGE_AVAILABLE_KEY,\n StorageEventListener\n} from '../../core/persistence';\n\n/**\n * Returns a persistence object that wraps `AsyncStorage` imported from\n * `react-native` or `@react-native-async-storage/async-storage`, and can\n * be used in the persistence dependency field in {@link initializeAuth}.\n *\n * @example\n * ```javascript\n * import { initializeAuth, getReactNativePersistence } from 'firebase/auth';\n *\n * // For @react-native-async-storage/async-storage v3:\n * import { createAsyncStorage } from '@react-native-async-storage/async-storage';\n * const appStorage = createAsyncStorage('app');\n * const persistence = getReactNativePersistence(appStorage);\n *\n * // For @react-native-async-storage/async-storage v2:\n * // import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';\n * // const persistence = getReactNativePersistence(ReactNativeAsyncStorage);\n *\n * // Then, initialize auth:\n * const auth = initializeAuth(app, {\n * persistence\n * });\n * ```\n *\n * @public\n */\nexport function getReactNativePersistence(\n storage: ReactNativeAsyncStorage\n): Persistence {\n // In the _getInstance() implementation (see src/core/persistence/index.ts),\n // we expect each \"externs.Persistence\" object passed to us by the user to\n // be able to be instantiated (as a class) using \"new\". That function also\n // expects the constructor to be empty. Since ReactNativeStorage requires the\n // underlying storage layer, we need to be able to create subclasses\n // (closures, essentially) that have the storage layer but empty constructor.\n return class implements PersistenceInternal {\n static type: 'LOCAL' = 'LOCAL';\n readonly type: PersistenceType = PersistenceType.LOCAL;\n\n async _isAvailable(): Promise<boolean> {\n try {\n if (!storage) {\n return false;\n }\n await storage.setItem(STORAGE_AVAILABLE_KEY, '1');\n await storage.removeItem(STORAGE_AVAILABLE_KEY);\n return true;\n } catch {\n return false;\n }\n }\n\n _set(key: string, value: PersistenceValue): Promise<void> {\n return storage.setItem(key, JSON.stringify(value));\n }\n\n async _get<T extends PersistenceValue>(key: string): Promise<T | null> {\n const json = await storage.getItem(key);\n return json ? JSON.parse(json) : null;\n }\n\n _remove(key: string): Promise<void> {\n return storage.removeItem(key);\n }\n\n _addListener(_key: string, _listener: StorageEventListener): void {\n // Listeners are not supported for React Native storage.\n return;\n }\n\n _removeListener(_key: string, _listener: StorageEventListener): void {\n // Listeners are not supported for React Native storage.\n return;\n }\n };\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * This is the file that people using React Native will actually import. You\n * should only include this file if you have something specific about your\n * implementation that mandates having a separate entrypoint. Otherwise you can\n * just use index.ts\n */\n\nimport { FirebaseApp, getApp, _getProvider } from '@firebase/app';\nimport { Auth, Dependencies } from './src/model/public_types';\n\nimport { initializeAuth as initializeAuthOriginal } from './src';\nimport { registerAuth } from './src/core/auth/register';\nimport { ClientPlatform } from './src/core/util/version';\nimport { _logWarn } from './src/core/util/log';\n\n// Core functionality shared by all clients\nexport * from './index.shared';\n\n// Export some Phone symbols\n// providers\nexport { PhoneAuthProvider } from './src/platform_browser/providers/phone';\n\n// strategies\nexport {\n signInWithPhoneNumber,\n linkWithPhoneNumber,\n reauthenticateWithPhoneNumber,\n updatePhoneNumber\n} from './src/platform_browser/strategies/phone';\n\n// MFA\nexport { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';\nexport {\n TotpMultiFactorGenerator,\n TotpSecret\n} from './src/mfa/assertions/totp';\n\nexport { getReactNativePersistence } from './src/platform_react_native/persistence/react_native';\n\nconst NO_PERSISTENCE_WARNING = `\nYou are initializing Firebase Auth for React Native without providing\nAsyncStorage. Auth state will default to memory persistence and will not\npersist between sessions. In order to persist auth state, install the package\n\"@react-native-async-storage/async-storage\" and provide it to\ninitializeAuth:\n\nimport { initializeAuth, getReactNativePersistence } from 'firebase/auth';\n\n// For @react-native-async-storage/async-storage v3:\nimport { createAsyncStorage } from '@react-native-async-storage/async-storage';\nconst appStorage = createAsyncStorage(\"app\");\nconst persistence = getReactNativePersistence(appStorage);\n\n/*\n// For @react-native-async-storage/async-storage v2:\nimport ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';\nconst persistence = getReactNativePersistence(ReactNativeAsyncStorage);\n*/\n\n// Then, initialize auth:\nconst auth = initializeAuth(app, {\n persistence\n});\n`;\n\nexport function getAuth(app: FirebaseApp = getApp()): Auth {\n const provider = _getProvider(app, 'auth');\n\n if (provider.isInitialized()) {\n return provider.getImmediate();\n }\n\n // Only warn if getAuth() is called before initializeAuth()\n _logWarn(NO_PERSISTENCE_WARNING);\n\n return initializeAuthOriginal(app);\n}\n\n/**\n * Wrapper around base `initializeAuth()` for RN users only, which\n * shows the warning message if no persistence is provided.\n * Double-checked potential collision with `export * from './index.shared'`\n * as `./index.shared` also exports `initializeAuth()`, and the final\n * bundle does correctly export only this `initializeAuth()` function\n * and not the one from index.shared.\n */\nexport function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth {\n if (!deps?.persistence) {\n _logWarn(NO_PERSISTENCE_WARNING);\n }\n return initializeAuthOriginal(app, deps);\n}\n\nregisterAuth(ClientPlatform.REACT_NATIVE);\n"],"names":["STORAGE_AVAILABLE_KEY","app","getApp","_getProvider","_logWarn","initializeAuthOriginal","registerAu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AAQ;AAsC/B,QAAA,EAAA,CAAA;AACJ;;ACtGA;;;;;;;;;;;;;;;AAeG;AAyCH,MAAM,sBAAsB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB9B,CAAC;AAEc,SAAA,OAAO,CAACC,KAAA,GAAmBC,UAAM,EAAE,EAAA;IACjD,MAAM,QAAQ,GAAGC,gBAAY,CAACF,KAAG,EAAE,MAAM,CAAC,CAAC;AAE3C,IAAA,IAAI,QAAQ,CAAC,aAAa,EAAE,EAAE;AAC5B,QAAA,OAAO,QAAQ,CAAC,YAAY,EAAE,CAAC;KAChC;;IAGDG,cAAQ,CAAC,sBAAsB,CAAC,CAAC;AAEjC,IAAA,OAAOC,oBAAsB,CAACJ,KAAG,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;AAOG;AACa,SAAA,cAAc,CAAC,GAAgB,EAAE,IAAmB,EAAA;AAClE,IAAA,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE;QACtBG,cAAQ,CAAC,sBAAsB,CAAC,CAAC;KAClC;AACD,IAAA,OAAOC,oBAAsB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAEDC,kBAAY,iDAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-e23bd279.js');
5
+ var index = require('./index-446db0d6.js');
6
6
  var app = require('@firebase/app');
7
7
  var util = require('@firebase/util');
8
8
  require('@firebase/component');
@@ -17,9 +17,28 @@
17
17
  import { Persistence, ReactNativeAsyncStorage } from '../../model/public_types';
18
18
  /**
19
19
  * Returns a persistence object that wraps `AsyncStorage` imported from
20
- * `react-native` or `@react-native-community/async-storage`, and can
20
+ * `react-native` or `@react-native-async-storage/async-storage`, and can
21
21
  * be used in the persistence dependency field in {@link initializeAuth}.
22
22
  *
23
+ * @example
24
+ * ```javascript
25
+ * import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
26
+ *
27
+ * // For @react-native-async-storage/async-storage v3:
28
+ * import { createAsyncStorage } from '@react-native-async-storage/async-storage';
29
+ * const appStorage = createAsyncStorage('app');
30
+ * const persistence = getReactNativePersistence(appStorage);
31
+ *
32
+ * // For @react-native-async-storage/async-storage v2:
33
+ * // import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';
34
+ * // const persistence = getReactNativePersistence(ReactNativeAsyncStorage);
35
+ *
36
+ * // Then, initialize auth:
37
+ * const auth = initializeAuth(app, {
38
+ * persistence
39
+ * });
40
+ * ```
41
+ *
23
42
  * @public
24
43
  */
25
44
  export declare function getReactNativePersistence(storage: ReactNativeAsyncStorage): Persistence;
@@ -17,9 +17,28 @@
17
17
  import { Persistence, ReactNativeAsyncStorage } from '../../model/public_types';
18
18
  /**
19
19
  * Returns a persistence object that wraps `AsyncStorage` imported from
20
- * `react-native` or `@react-native-community/async-storage`, and can
20
+ * `react-native` or `@react-native-async-storage/async-storage`, and can
21
21
  * be used in the persistence dependency field in {@link initializeAuth}.
22
22
  *
23
+ * @example
24
+ * ```javascript
25
+ * import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
26
+ *
27
+ * // For @react-native-async-storage/async-storage v3:
28
+ * import { createAsyncStorage } from '@react-native-async-storage/async-storage';
29
+ * const appStorage = createAsyncStorage('app');
30
+ * const persistence = getReactNativePersistence(appStorage);
31
+ *
32
+ * // For @react-native-async-storage/async-storage v2:
33
+ * // import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';
34
+ * // const persistence = getReactNativePersistence(ReactNativeAsyncStorage);
35
+ *
36
+ * // Then, initialize auth:
37
+ * const auth = initializeAuth(app, {
38
+ * persistence
39
+ * });
40
+ * ```
41
+ *
23
42
  * @public
24
43
  */
25
44
  export declare function getReactNativePersistence(storage: ReactNativeAsyncStorage): Persistence;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var register = require('./register-a20238ea.js');
5
+ var register = require('./register-4a6573e8.js');
6
6
  var app = require('@firebase/app');
7
7
  var util = require('@firebase/util');
8
8
  require('@firebase/component');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var register = require('./register-a20238ea.js');
5
+ var register = require('./register-4a6573e8.js');
6
6
  var util = require('@firebase/util');
7
7
  var app = require('@firebase/app');
8
8
  require('@firebase/component');
@@ -8107,7 +8107,7 @@ function _isEmptyString(input) {
8107
8107
  }
8108
8108
 
8109
8109
  var name = "@firebase/auth";
8110
- var version = "1.12.2";
8110
+ var version = "1.13.0-20260408201731";
8111
8111
 
8112
8112
  /**
8113
8113
  * @license
@@ -8371,4 +8371,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
8371
8371
  exports.validatePassword = validatePassword;
8372
8372
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
8373
8373
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
8374
- //# sourceMappingURL=register-a20238ea.js.map
8374
+ //# sourceMappingURL=register-4a6573e8.js.map