@firebase/auth 1.7.5-canary.fd8bd4b02 → 1.7.5-dataconnect-preview.d986d4bf2

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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/auth-public.d.ts +4 -4
  3. package/dist/auth.d.ts +4 -4
  4. package/dist/browser-cjs/{index-01de3fee.js → index-4eeef7da.js} +12 -16
  5. package/dist/browser-cjs/index-4eeef7da.js.map +1 -0
  6. package/dist/browser-cjs/index.js +1 -1
  7. package/dist/browser-cjs/internal.js +5 -5
  8. package/dist/browser-cjs/internal.js.map +1 -1
  9. package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +1 -1
  10. package/dist/browser-cjs/src/core/providers/github.d.ts +4 -4
  11. package/dist/browser-cjs/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  12. package/dist/browser-cjs/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  13. package/dist/browser-cjs/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  14. package/dist/browser-cjs/test/integration/webdriver/util/idp_page.d.ts +1 -1
  15. package/dist/cordova/auth-cordova-public.d.ts +4 -4
  16. package/dist/cordova/auth-cordova.d.ts +4 -4
  17. package/dist/cordova/index.js +2 -2
  18. package/dist/cordova/internal.js +4 -8
  19. package/dist/cordova/internal.js.map +1 -1
  20. package/dist/cordova/{popup_redirect-544d9ddf.js → popup_redirect-d70abe8d.js} +13 -13
  21. package/dist/cordova/popup_redirect-d70abe8d.js.map +1 -0
  22. package/dist/cordova/src/core/auth/auth_impl.d.ts +1 -1
  23. package/dist/cordova/src/core/providers/github.d.ts +4 -4
  24. package/dist/cordova/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  25. package/dist/cordova/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  26. package/dist/cordova/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  27. package/dist/cordova/test/integration/webdriver/util/idp_page.d.ts +1 -1
  28. package/dist/esm2017/{index-0e545963.js → index-20cf57ca.js} +12 -16
  29. package/dist/esm2017/index-20cf57ca.js.map +1 -0
  30. package/dist/esm2017/index.js +1 -1
  31. package/dist/esm2017/internal.js +6 -6
  32. package/dist/esm2017/internal.js.map +1 -1
  33. package/dist/esm2017/src/core/auth/auth_impl.d.ts +1 -1
  34. package/dist/esm2017/src/core/providers/github.d.ts +4 -4
  35. package/dist/esm2017/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  36. package/dist/esm2017/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  37. package/dist/esm2017/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  38. package/dist/esm2017/test/integration/webdriver/util/idp_page.d.ts +1 -1
  39. package/dist/esm5/{index-06a2e111.js → index-a3671194.js} +11 -15
  40. package/dist/esm5/index-a3671194.js.map +1 -0
  41. package/dist/esm5/index.js +1 -1
  42. package/dist/esm5/internal.js +6 -6
  43. package/dist/esm5/internal.js.map +1 -1
  44. package/dist/esm5/src/core/auth/auth_impl.d.ts +1 -1
  45. package/dist/esm5/src/core/providers/github.d.ts +4 -4
  46. package/dist/esm5/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  47. package/dist/esm5/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  48. package/dist/esm5/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  49. package/dist/esm5/test/integration/webdriver/util/idp_page.d.ts +1 -1
  50. package/dist/index.webworker.esm5.js +8 -8
  51. package/dist/index.webworker.esm5.js.map +1 -1
  52. package/dist/node/index.js +1 -1
  53. package/dist/node/internal.js +5 -5
  54. package/dist/node/internal.js.map +1 -1
  55. package/dist/node/src/core/auth/auth_impl.d.ts +1 -1
  56. package/dist/node/src/core/providers/github.d.ts +4 -4
  57. package/dist/node/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  58. package/dist/node/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  59. package/dist/node/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  60. package/dist/node/test/integration/webdriver/util/idp_page.d.ts +1 -1
  61. package/dist/node/{totp-3ccf5f50.js → totp-3e98487e.js} +8 -8
  62. package/dist/node/totp-3e98487e.js.map +1 -0
  63. package/dist/node-esm/index.js +1 -1
  64. package/dist/node-esm/internal.js +7 -7
  65. package/dist/node-esm/internal.js.map +1 -1
  66. package/dist/node-esm/src/core/auth/auth_impl.d.ts +1 -1
  67. package/dist/node-esm/src/core/providers/github.d.ts +4 -4
  68. package/dist/node-esm/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  69. package/dist/node-esm/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  70. package/dist/node-esm/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  71. package/dist/node-esm/test/integration/webdriver/util/idp_page.d.ts +1 -1
  72. package/dist/node-esm/{totp-27874b79.js → totp-73723a04.js} +8 -8
  73. package/dist/node-esm/totp-73723a04.js.map +1 -0
  74. package/dist/rn/{index-2ca55940.js → index-4bb57ab8.js} +9 -9
  75. package/dist/rn/index-4bb57ab8.js.map +1 -0
  76. package/dist/rn/index.js +2 -2
  77. package/dist/rn/index.js.map +1 -1
  78. package/dist/rn/internal.js +7 -11
  79. package/dist/rn/internal.js.map +1 -1
  80. package/dist/rn/src/core/auth/auth_impl.d.ts +1 -1
  81. package/dist/rn/src/core/providers/github.d.ts +4 -4
  82. package/dist/rn/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  83. package/dist/rn/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  84. package/dist/rn/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  85. package/dist/rn/test/integration/webdriver/util/idp_page.d.ts +1 -1
  86. package/dist/src/core/auth/auth_impl.d.ts +1 -1
  87. package/dist/src/core/providers/github.d.ts +4 -4
  88. package/dist/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  89. package/dist/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  90. package/dist/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  91. package/dist/test/integration/webdriver/util/idp_page.d.ts +1 -1
  92. package/dist/web-extension-cjs/index.js +1 -1
  93. package/dist/web-extension-cjs/internal.js +8 -12
  94. package/dist/web-extension-cjs/internal.js.map +1 -1
  95. package/dist/web-extension-cjs/{register-8c214e06.js → register-3a0d2381.js} +9 -9
  96. package/dist/web-extension-cjs/register-3a0d2381.js.map +1 -0
  97. package/dist/web-extension-cjs/src/core/auth/auth_impl.d.ts +1 -1
  98. package/dist/web-extension-cjs/src/core/providers/github.d.ts +4 -4
  99. package/dist/web-extension-cjs/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  100. package/dist/web-extension-cjs/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  101. package/dist/web-extension-cjs/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  102. package/dist/web-extension-cjs/test/integration/webdriver/util/idp_page.d.ts +1 -1
  103. package/dist/web-extension-esm2017/auth-web-extension-public.d.ts +4 -4
  104. package/dist/web-extension-esm2017/auth-web-extension.d.ts +4 -4
  105. package/dist/web-extension-esm2017/index.js +2 -2
  106. package/dist/web-extension-esm2017/internal.js +9 -13
  107. package/dist/web-extension-esm2017/internal.js.map +1 -1
  108. package/dist/web-extension-esm2017/{register-ef88a52a.js → register-5ac1728e.js} +9 -9
  109. package/dist/web-extension-esm2017/register-5ac1728e.js.map +1 -0
  110. package/dist/web-extension-esm2017/src/core/auth/auth_impl.d.ts +1 -1
  111. package/dist/web-extension-esm2017/src/core/providers/github.d.ts +4 -4
  112. package/dist/web-extension-esm2017/src/platform_browser/messagechannel/receiver.d.ts +1 -1
  113. package/dist/web-extension-esm2017/src/platform_cordova/popup_redirect/events.d.ts +1 -1
  114. package/dist/web-extension-esm2017/test/integration/webdriver/util/auth_driver.d.ts +1 -1
  115. package/dist/web-extension-esm2017/test/integration/webdriver/util/idp_page.d.ts +1 -1
  116. package/package.json +7 -8
  117. package/dist/browser-cjs/index-01de3fee.js.map +0 -1
  118. package/dist/cordova/popup_redirect-544d9ddf.js.map +0 -1
  119. package/dist/esm2017/index-0e545963.js.map +0 -1
  120. package/dist/esm5/index-06a2e111.js.map +0 -1
  121. package/dist/node/totp-3ccf5f50.js.map +0 -1
  122. package/dist/node-esm/totp-27874b79.js.map +0 -1
  123. package/dist/rn/index-2ca55940.js.map +0 -1
  124. package/dist/web-extension-cjs/register-8c214e06.js.map +0 -1
  125. package/dist/web-extension-esm2017/register-ef88a52a.js.map +0 -1
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-2ca55940.js');
6
+ var index = require('./index-4bb57ab8.js');
7
7
  var tslib = require('tslib');
8
8
  require('@firebase/util');
9
9
  require('@firebase/component');
@@ -39,7 +39,7 @@ function getReactNativePersistence(storage) {
39
39
  // be able to be instantiated (as a class) using "new". That function also
40
40
  // expects the constructor to be empty. Since ReactNativeStorage requires the
41
41
  // underlying storage layer, we need to be able to create subclasses
42
- // (closures, esentially) that have the storage layer but empty constructor.
42
+ // (closures, essentially) that have the storage layer but empty constructor.
43
43
  return _a = /** @class */ (function () {
44
44
  function class_1() {
45
45
  this.type = "LOCAL" /* PersistenceType.LOCAL */;
@@ -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, esentially) 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;;;;;;;;AAQhC,IAAA,OAAA,EAAA,kBAAA,YAAA;AAAO,YAAA,SAAA,OAAA,GAAA;AAEI,gBAAA,IAAA,CAAA,IAAI,GAA0C,OAAA,6BAAA;aAqCxD;AAnCO,YAAA,OAAA,CAAA,SAAA,CAAA,YAAY,GAAlB,YAAA;;;;;;gCAEI,IAAI,CAAC,OAAO,EAAE;AACZ,oCAAA,OAAA,CAAA,CAAA,aAAO,KAAK,CAAC,CAAA;AACd,iCAAA;gCACD,OAAM,CAAA,CAAA,YAAA,OAAO,CAAC,OAAO,CAACA,2BAAqB,EAAE,GAAG,CAAC,CAAA,CAAA;;AAAjD,gCAAA,EAAA,CAAA,IAAA,EAAiD,CAAC;AAClD,gCAAA,OAAA,CAAA,CAAA,YAAM,OAAO,CAAC,UAAU,CAACA,2BAAqB,CAAC,CAAA,CAAA;;AAA/C,gCAAA,EAAA,CAAA,IAAA,EAA+C,CAAC;AAChD,gCAAA,OAAA,CAAA,CAAA,aAAO,IAAI,CAAC,CAAA;;;AAEZ,gCAAA,OAAA,CAAA,CAAA,aAAO,KAAK,CAAC,CAAA;;;;;AAEhB,aAAA,CAAA;AAED,YAAA,OAAA,CAAA,SAAA,CAAA,IAAI,GAAJ,UAAK,GAAW,EAAE,KAAuB,EAAA;AACvC,gBAAA,OAAO,OAAO,CAAC,OAAO,CAAC,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A,OAAO,QAAQ,CAAC,YAAY,EAAE,CAAC;AAChC,KAAA;;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;IAClE,IAAI,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA,EAAE;QACtBG,cAAQ,CAAC,sBAAsB,CAAC,CAAC;AAClC,KAAA;AACD,IAAA,OAAOC,oBAAsB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAEDC,kBAAY,iDAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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.RE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EAAE,IAAmB,EAAA;IAClE,IAAI,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA,EAAE;QACtBG,cAAQ,CAAC,sBAAsB,CAAC,CAAC;AAClC,KAAA;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-2ca55940.js');
5
+ var index = require('./index-4bb57ab8.js');
6
6
  var tslib = require('tslib');
7
7
  var util = require('@firebase/util');
8
8
  var app = require('@firebase/app');
@@ -514,7 +514,7 @@ var Receiver = /** @class */ (function () {
514
514
  * Unsubscribe an event handler from a particular event.
515
515
  *
516
516
  * @param eventType - Event name to unsubscribe from.
517
- * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.
517
+ * @param eventHandler - Optional event handler, if none provided, unsubscribe all handlers on this event.
518
518
  *
519
519
  */
520
520
  Receiver.prototype._unsubscribe = function (eventType, eventHandler) {
@@ -2412,7 +2412,7 @@ function matchDomain(expected) {
2412
2412
  */
2413
2413
  var NETWORK_TIMEOUT = new index.Delay(30000, 60000);
2414
2414
  /**
2415
- * Reset unlaoded GApi modules. If gapi.load fails due to a network error,
2415
+ * Reset unloaded GApi modules. If gapi.load fails due to a network error,
2416
2416
  * it will stop working after a retrial. This is a hack to fix this issue.
2417
2417
  */
2418
2418
  function resetUnloadedGapiModules() {
@@ -3060,10 +3060,6 @@ index._setExternalJSProvider({
3060
3060
  // TODO: consider adding timeout support & cancellation
3061
3061
  return new Promise(function (resolve, reject) {
3062
3062
  var el = document.createElement('script');
3063
- // TODO: Do not use setAttribute, since it can lead to XSS. Instead, use the safevalues library to
3064
- // safely set an attribute for a sanitized trustedResourceUrl. Since the trustedResourceUrl
3065
- // must be initialized from a template string literal, this could involve some heavy
3066
- // refactoring.
3067
3063
  el.setAttribute('src', url);
3068
3064
  el.onload = resolve;
3069
3065
  el.onerror = function (e) {
@@ -3237,7 +3233,7 @@ function _waitForAppResume(auth, eventListener, iabRef) {
3237
3233
  if (typeof closeBrowserTab === 'function') {
3238
3234
  closeBrowserTab();
3239
3235
  }
3240
- // Close inappbrowser emebedded webview in iOS7 and 8 case if still
3236
+ // Close inappbrowser embedded webview in iOS7 and 8 case if still
3241
3237
  // open.
3242
3238
  if (typeof (iabRef === null || iabRef === void 0 ? void 0 : iabRef.close) === 'function') {
3243
3239
  iabRef.close();
@@ -3249,7 +3245,7 @@ function _waitForAppResume(auth, eventListener, iabRef) {
3249
3245
  return;
3250
3246
  }
3251
3247
  onCloseTimer = window.setTimeout(function () {
3252
- // Wait two seeconds after resume then reject.
3248
+ // Wait two seconds after resume then reject.
3253
3249
  reject(index._createError(auth, "redirect-cancelled-by-user" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */));
3254
3250
  }, REDIRECT_TIMEOUT_MS);
3255
3251
  }
@@ -3379,7 +3375,7 @@ var CordovaAuthEventManager = /** @class */ (function (_super) {
3379
3375
  var _this = _super !== null && _super.apply(this, arguments) || this;
3380
3376
  _this.passiveListeners = new Set();
3381
3377
  _this.initPromise = new Promise(function (resolve) {
3382
- _this.resolveInialized = resolve;
3378
+ _this.resolveInitialized = resolve;
3383
3379
  });
3384
3380
  return _this;
3385
3381
  }
@@ -3397,7 +3393,7 @@ var CordovaAuthEventManager = /** @class */ (function (_super) {
3397
3393
  };
3398
3394
  /** Override the onEvent method */
3399
3395
  CordovaAuthEventManager.prototype.onEvent = function (event) {
3400
- this.resolveInialized();
3396
+ this.resolveInitialized();
3401
3397
  this.passiveListeners.forEach(function (cb) { return cb(event); });
3402
3398
  return _super.prototype.onEvent.call(this, event);
3403
3399
  };