@firebase/auth 0.18.3 → 0.19.0-canary.0b3ca78eb

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 (365) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/auth-public.d.ts +28 -19
  3. package/dist/auth.d.ts +29 -20
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/index.rn.d.ts +3 -0
  6. package/dist/cordova/internal.js +7 -3
  7. package/dist/cordova/internal.js.map +1 -1
  8. package/dist/cordova/{popup_redirect-f608cd47.js → popup_redirect-680c56fc.js} +54 -33
  9. package/dist/cordova/popup_redirect-680c56fc.js.map +1 -0
  10. package/dist/cordova/src/core/errors.d.ts +2 -2
  11. package/dist/cordova/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  12. package/dist/cordova/src/mfa/mfa_error.d.ts +4 -5
  13. package/dist/cordova/src/model/public_types.d.ts +25 -19
  14. package/dist/cordova/src/platform_browser/persistence/browser.d.ts +4 -3
  15. package/dist/cordova/src/platform_browser/persistence/browser.test.d.ts +17 -0
  16. package/dist/cordova/src/platform_browser/strategies/phone.d.ts +3 -0
  17. package/dist/cordova/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  18. package/dist/esm2017/{index-f41a0691.js → index-100be16e.js} +43 -25
  19. package/dist/esm2017/index-100be16e.js.map +1 -0
  20. package/dist/esm2017/index.js +1 -1
  21. package/dist/esm2017/index.rn.d.ts +3 -0
  22. package/dist/esm2017/internal.js +2 -2
  23. package/dist/esm2017/src/core/errors.d.ts +2 -2
  24. package/dist/esm2017/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  25. package/dist/esm2017/src/mfa/mfa_error.d.ts +4 -5
  26. package/dist/esm2017/src/model/public_types.d.ts +25 -19
  27. package/dist/esm2017/src/platform_browser/persistence/browser.d.ts +4 -3
  28. package/dist/esm2017/src/platform_browser/persistence/browser.test.d.ts +17 -0
  29. package/dist/esm2017/src/platform_browser/strategies/phone.d.ts +3 -0
  30. package/dist/esm2017/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  31. package/dist/esm5/{index-fd8b7af5.js → index-4c58d8b7.js} +59 -34
  32. package/dist/esm5/index-4c58d8b7.js.map +1 -0
  33. package/dist/esm5/index.js +1 -1
  34. package/dist/esm5/index.rn.d.ts +3 -0
  35. package/dist/esm5/internal.js +2 -2
  36. package/dist/esm5/src/core/errors.d.ts +2 -2
  37. package/dist/esm5/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  38. package/dist/esm5/src/mfa/mfa_error.d.ts +4 -5
  39. package/dist/esm5/src/model/public_types.d.ts +25 -19
  40. package/dist/esm5/src/platform_browser/persistence/browser.d.ts +4 -3
  41. package/dist/esm5/src/platform_browser/persistence/browser.test.d.ts +17 -0
  42. package/dist/esm5/src/platform_browser/strategies/phone.d.ts +3 -0
  43. package/dist/esm5/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  44. package/dist/index.rn.d.ts +3 -0
  45. package/dist/index.webworker.esm5.js +25 -23
  46. package/dist/index.webworker.esm5.js.map +1 -1
  47. package/dist/node/{index-358613ec.js → index-8505a33c.js} +26 -24
  48. package/dist/node/index-8505a33c.js.map +1 -0
  49. package/dist/node/index.js +1 -1
  50. package/dist/node/index.rn.d.ts +3 -0
  51. package/dist/node/internal.js +29 -10
  52. package/dist/node/internal.js.map +1 -1
  53. package/dist/node/src/core/errors.d.ts +2 -2
  54. package/dist/node/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  55. package/dist/node/src/mfa/mfa_error.d.ts +4 -5
  56. package/dist/node/src/model/public_types.d.ts +25 -19
  57. package/dist/node/src/platform_browser/persistence/browser.d.ts +4 -3
  58. package/dist/node/src/platform_browser/persistence/browser.test.d.ts +17 -0
  59. package/dist/node/src/platform_browser/strategies/phone.d.ts +3 -0
  60. package/dist/node/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  61. package/dist/node-esm/index-4b759c81.js +6031 -0
  62. package/dist/node-esm/index-4b759c81.js.map +1 -0
  63. package/dist/node-esm/index.cordova.d.ts +32 -0
  64. package/dist/node-esm/index.d.ts +36 -0
  65. package/dist/node-esm/index.doc.d.ts +24 -0
  66. package/dist/node-esm/index.js +8 -0
  67. package/dist/node-esm/index.js.map +1 -0
  68. package/dist/node-esm/index.node.d.ts +17 -0
  69. package/dist/node-esm/index.rn.d.ts +30 -0
  70. package/dist/node-esm/index.shared.d.ts +19 -0
  71. package/dist/node-esm/index.webworker.d.ts +21 -0
  72. package/dist/node-esm/internal/index.d.ts +41 -0
  73. package/dist/node-esm/internal.js +1455 -0
  74. package/dist/node-esm/internal.js.map +1 -0
  75. package/dist/node-esm/package.json +1 -0
  76. package/dist/node-esm/scripts/run_node_tests.d.ts +17 -0
  77. package/dist/node-esm/src/api/account_management/account.d.ts +59 -0
  78. package/dist/node-esm/src/api/account_management/account.test.d.ts +17 -0
  79. package/dist/node-esm/src/api/account_management/email_and_password.d.ts +47 -0
  80. package/dist/node-esm/src/api/account_management/email_and_password.test.d.ts +17 -0
  81. package/dist/node-esm/src/api/account_management/mfa.d.ts +69 -0
  82. package/dist/node-esm/src/api/account_management/mfa.test.d.ts +17 -0
  83. package/dist/node-esm/src/api/account_management/profile.d.ts +29 -0
  84. package/dist/node-esm/src/api/account_management/profile.test.d.ts +17 -0
  85. package/dist/node-esm/src/api/authentication/create_auth_uri.d.ts +26 -0
  86. package/dist/node-esm/src/api/authentication/create_auth_uri.test.d.ts +17 -0
  87. package/dist/node-esm/src/api/authentication/custom_token.d.ts +26 -0
  88. package/dist/node-esm/src/api/authentication/custom_token.test.d.ts +17 -0
  89. package/dist/node-esm/src/api/authentication/email_and_password.d.ts +76 -0
  90. package/dist/node-esm/src/api/authentication/email_and_password.test.d.ts +17 -0
  91. package/dist/node-esm/src/api/authentication/email_link.d.ts +32 -0
  92. package/dist/node-esm/src/api/authentication/email_link.test.d.ts +17 -0
  93. package/dist/node-esm/src/api/authentication/idp.d.ts +40 -0
  94. package/dist/node-esm/src/api/authentication/idp.test.d.ts +17 -0
  95. package/dist/node-esm/src/api/authentication/mfa.d.ts +58 -0
  96. package/dist/node-esm/src/api/authentication/mfa.test.d.ts +17 -0
  97. package/dist/node-esm/src/api/authentication/recaptcha.d.ts +18 -0
  98. package/dist/node-esm/src/api/authentication/recaptcha.test.d.ts +17 -0
  99. package/dist/node-esm/src/api/authentication/sign_up.d.ts +29 -0
  100. package/dist/node-esm/src/api/authentication/sign_up.test.d.ts +17 -0
  101. package/dist/node-esm/src/api/authentication/sms.d.ts +50 -0
  102. package/dist/node-esm/src/api/authentication/sms.test.d.ts +17 -0
  103. package/dist/node-esm/src/api/authentication/token.d.ts +26 -0
  104. package/dist/node-esm/src/api/authentication/token.test.d.ts +17 -0
  105. package/dist/node-esm/src/api/errors.d.ts +118 -0
  106. package/dist/node-esm/src/api/index.d.ts +67 -0
  107. package/dist/node-esm/src/api/index.test.d.ts +17 -0
  108. package/dist/node-esm/src/api/project_config/get_project_config.d.ts +25 -0
  109. package/dist/node-esm/src/api/project_config/get_project_config.test.d.ts +17 -0
  110. package/dist/node-esm/src/core/action_code_url.d.ts +73 -0
  111. package/dist/node-esm/src/core/action_code_url.test.d.ts +17 -0
  112. package/dist/node-esm/src/core/auth/auth_event_manager.d.ts +34 -0
  113. package/dist/node-esm/src/core/auth/auth_event_manager.test.d.ts +17 -0
  114. package/dist/node-esm/src/core/auth/auth_impl.d.ts +106 -0
  115. package/dist/node-esm/src/core/auth/auth_impl.test.d.ts +17 -0
  116. package/dist/node-esm/src/core/auth/emulator.d.ts +42 -0
  117. package/dist/node-esm/src/core/auth/emulator.test.d.ts +17 -0
  118. package/dist/node-esm/src/core/auth/firebase_internal.d.ts +35 -0
  119. package/dist/node-esm/src/core/auth/firebase_internal.test.d.ts +17 -0
  120. package/dist/node-esm/src/core/auth/initialize.d.ts +46 -0
  121. package/dist/node-esm/src/core/auth/initialize.test.d.ts +17 -0
  122. package/dist/node-esm/src/core/auth/register.d.ts +23 -0
  123. package/dist/node-esm/src/core/credentials/auth_credential.d.ts +75 -0
  124. package/dist/node-esm/src/core/credentials/email.d.ts +60 -0
  125. package/dist/node-esm/src/core/credentials/email.test.d.ts +17 -0
  126. package/dist/node-esm/src/core/credentials/index.d.ts +23 -0
  127. package/dist/node-esm/src/core/credentials/oauth.d.ts +81 -0
  128. package/dist/node-esm/src/core/credentials/oauth.test.d.ts +17 -0
  129. package/dist/node-esm/src/core/credentials/phone.d.ts +52 -0
  130. package/dist/node-esm/src/core/credentials/phone.test.d.ts +17 -0
  131. package/dist/node-esm/src/core/credentials/saml.d.ts +52 -0
  132. package/dist/node-esm/src/core/credentials/saml.test.d.ts +17 -0
  133. package/dist/node-esm/src/core/errors.d.ts +299 -0
  134. package/dist/node-esm/src/core/errors.test.d.ts +17 -0
  135. package/dist/node-esm/src/core/index.d.ts +141 -0
  136. package/dist/node-esm/src/core/persistence/in_memory.d.ts +35 -0
  137. package/dist/node-esm/src/core/persistence/in_memory.test.d.ts +17 -0
  138. package/dist/node-esm/src/core/persistence/index.d.ts +41 -0
  139. package/dist/node-esm/src/core/persistence/persistence_user_manager.d.ts +45 -0
  140. package/dist/node-esm/src/core/persistence/persistence_user_manager.test.d.ts +17 -0
  141. package/dist/node-esm/src/core/providers/email.d.ts +83 -0
  142. package/dist/node-esm/src/core/providers/email.test.d.ts +17 -0
  143. package/dist/node-esm/src/core/providers/facebook.d.ts +93 -0
  144. package/dist/node-esm/src/core/providers/facebook.test.d.ts +17 -0
  145. package/dist/node-esm/src/core/providers/federated.d.ts +64 -0
  146. package/dist/node-esm/src/core/providers/federated.test.d.ts +17 -0
  147. package/dist/node-esm/src/core/providers/github.d.ts +89 -0
  148. package/dist/node-esm/src/core/providers/github.test.d.ts +17 -0
  149. package/dist/node-esm/src/core/providers/google.d.ts +96 -0
  150. package/dist/node-esm/src/core/providers/google.test.d.ts +17 -0
  151. package/dist/node-esm/src/core/providers/oauth.d.ts +151 -0
  152. package/dist/node-esm/src/core/providers/oauth.test.d.ts +17 -0
  153. package/dist/node-esm/src/core/providers/saml.d.ts +62 -0
  154. package/dist/node-esm/src/core/providers/saml.test.d.ts +17 -0
  155. package/dist/node-esm/src/core/providers/twitter.d.ts +103 -0
  156. package/dist/node-esm/src/core/providers/twitter.test.d.ts +17 -0
  157. package/dist/node-esm/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  158. package/dist/node-esm/src/core/strategies/abstract_popup_redirect_operation.test.d.ts +17 -0
  159. package/dist/node-esm/src/core/strategies/action_code_settings.d.ts +19 -0
  160. package/dist/node-esm/src/core/strategies/action_code_settings.test.d.ts +17 -0
  161. package/dist/node-esm/src/core/strategies/anonymous.d.ts +29 -0
  162. package/dist/node-esm/src/core/strategies/anonymous.test.d.ts +17 -0
  163. package/dist/node-esm/src/core/strategies/credential.d.ts +57 -0
  164. package/dist/node-esm/src/core/strategies/credential.test.d.ts +17 -0
  165. package/dist/node-esm/src/core/strategies/custom_token.d.ts +34 -0
  166. package/dist/node-esm/src/core/strategies/custom_token.test.d.ts +17 -0
  167. package/dist/node-esm/src/core/strategies/email.d.ts +98 -0
  168. package/dist/node-esm/src/core/strategies/email.test.d.ts +17 -0
  169. package/dist/node-esm/src/core/strategies/email_and_password.d.ts +126 -0
  170. package/dist/node-esm/src/core/strategies/email_and_password.test.d.ts +17 -0
  171. package/dist/node-esm/src/core/strategies/email_link.d.ts +103 -0
  172. package/dist/node-esm/src/core/strategies/email_link.test.d.ts +17 -0
  173. package/dist/node-esm/src/core/strategies/idp.d.ts +32 -0
  174. package/dist/node-esm/src/core/strategies/idp.test.d.ts +17 -0
  175. package/dist/node-esm/src/core/strategies/redirect.d.ts +35 -0
  176. package/dist/node-esm/src/core/strategies/redirect.test.d.ts +17 -0
  177. package/dist/node-esm/src/core/user/account_info.d.ts +60 -0
  178. package/dist/node-esm/src/core/user/account_info.test.d.ts +17 -0
  179. package/dist/node-esm/src/core/user/additional_user_info.d.ts +31 -0
  180. package/dist/node-esm/src/core/user/additional_user_info.test.d.ts +17 -0
  181. package/dist/node-esm/src/core/user/id_token_result.d.ts +48 -0
  182. package/dist/node-esm/src/core/user/id_token_result.test.d.ts +17 -0
  183. package/dist/node-esm/src/core/user/invalidation.d.ts +18 -0
  184. package/dist/node-esm/src/core/user/invalidation.test.d.ts +17 -0
  185. package/dist/node-esm/src/core/user/link_unlink.d.ts +30 -0
  186. package/dist/node-esm/src/core/user/link_unlink.test.d.ts +17 -0
  187. package/dist/node-esm/src/core/user/proactive_refresh.d.ts +34 -0
  188. package/dist/node-esm/src/core/user/proactive_refresh.test.d.ts +17 -0
  189. package/dist/node-esm/src/core/user/reauthenticate.d.ts +20 -0
  190. package/dist/node-esm/src/core/user/reauthenticate.test.d.ts +17 -0
  191. package/dist/node-esm/src/core/user/reload.d.ts +27 -0
  192. package/dist/node-esm/src/core/user/reload.test.d.ts +17 -0
  193. package/dist/node-esm/src/core/user/token_manager.d.ts +49 -0
  194. package/dist/node-esm/src/core/user/token_manager.test.d.ts +17 -0
  195. package/dist/node-esm/src/core/user/user_credential_impl.d.ts +37 -0
  196. package/dist/node-esm/src/core/user/user_credential_impl.test.d.ts +17 -0
  197. package/dist/node-esm/src/core/user/user_impl.d.ts +68 -0
  198. package/dist/node-esm/src/core/user/user_impl.test.d.ts +17 -0
  199. package/dist/node-esm/src/core/user/user_metadata.d.ts +27 -0
  200. package/dist/node-esm/src/core/util/assert.d.ts +93 -0
  201. package/dist/node-esm/src/core/util/assert.test.d.ts +17 -0
  202. package/dist/node-esm/src/core/util/browser.d.ts +50 -0
  203. package/dist/node-esm/src/core/util/browser.test.d.ts +17 -0
  204. package/dist/node-esm/src/core/util/delay.d.ts +31 -0
  205. package/dist/node-esm/src/core/util/delay.test.d.ts +17 -0
  206. package/dist/node-esm/src/core/util/emulator.d.ts +18 -0
  207. package/dist/node-esm/src/core/util/emulator.test.d.ts +17 -0
  208. package/dist/node-esm/src/core/util/event_id.d.ts +17 -0
  209. package/dist/node-esm/src/core/util/event_id.test.d.ts +17 -0
  210. package/dist/node-esm/src/core/util/fetch_provider.d.ts +25 -0
  211. package/dist/node-esm/src/core/util/handler.d.ts +20 -0
  212. package/dist/node-esm/src/core/util/instantiator.d.ts +28 -0
  213. package/dist/node-esm/src/core/util/instantiator.test.d.ts +17 -0
  214. package/dist/node-esm/src/core/util/location.d.ts +19 -0
  215. package/dist/node-esm/src/core/util/log.d.ts +22 -0
  216. package/dist/node-esm/src/core/util/navigator.d.ts +21 -0
  217. package/dist/node-esm/src/core/util/providers.d.ts +23 -0
  218. package/dist/node-esm/src/core/util/resolver.d.ts +25 -0
  219. package/dist/node-esm/src/core/util/time.d.ts +17 -0
  220. package/dist/node-esm/src/core/util/validate_origin.d.ts +18 -0
  221. package/dist/node-esm/src/core/util/validate_origin.test.d.ts +17 -0
  222. package/dist/node-esm/src/core/util/version.d.ts +30 -0
  223. package/dist/node-esm/src/core/util/version.test.d.ts +17 -0
  224. package/dist/node-esm/src/index.d.ts +18 -0
  225. package/dist/node-esm/src/mfa/index.d.ts +18 -0
  226. package/dist/node-esm/src/mfa/mfa_assertion.d.ts +27 -0
  227. package/dist/node-esm/src/mfa/mfa_error.d.ts +35 -0
  228. package/dist/node-esm/src/mfa/mfa_info.d.ts +32 -0
  229. package/dist/node-esm/src/mfa/mfa_info.test.d.ts +17 -0
  230. package/dist/node-esm/src/mfa/mfa_resolver.d.ts +41 -0
  231. package/dist/node-esm/src/mfa/mfa_resolver.test.d.ts +17 -0
  232. package/dist/node-esm/src/mfa/mfa_session.d.ts +37 -0
  233. package/dist/node-esm/src/mfa/mfa_session.test.d.ts +17 -0
  234. package/dist/node-esm/src/mfa/mfa_user.d.ts +38 -0
  235. package/dist/node-esm/src/mfa/mfa_user.test.d.ts +17 -0
  236. package/dist/node-esm/src/model/application_verifier.d.ts +23 -0
  237. package/dist/node-esm/src/model/auth.d.ts +75 -0
  238. package/dist/node-esm/src/model/enum_maps.d.ts +97 -0
  239. package/dist/node-esm/src/model/enums.d.ts +74 -0
  240. package/dist/node-esm/src/model/id_token.d.ts +84 -0
  241. package/dist/node-esm/src/model/popup_redirect.d.ts +92 -0
  242. package/dist/node-esm/src/model/public_types.d.ts +1139 -0
  243. package/dist/node-esm/src/model/user.d.ts +79 -0
  244. package/dist/node-esm/src/platform_browser/auth.test.d.ts +17 -0
  245. package/dist/node-esm/src/platform_browser/auth_window.d.ts +37 -0
  246. package/dist/node-esm/src/platform_browser/iframe/gapi.d.ts +19 -0
  247. package/dist/node-esm/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  248. package/dist/node-esm/src/platform_browser/iframe/gapi.test.d.ts +17 -0
  249. package/dist/node-esm/src/platform_browser/iframe/iframe.d.ts +18 -0
  250. package/dist/node-esm/src/platform_browser/iframe/iframe.test.d.ts +17 -0
  251. package/dist/node-esm/src/platform_browser/index.d.ts +27 -0
  252. package/dist/node-esm/src/platform_browser/load_js.d.ts +18 -0
  253. package/dist/node-esm/src/platform_browser/load_js.test.d.ts +17 -0
  254. package/dist/node-esm/src/platform_browser/messagechannel/index.d.ts +87 -0
  255. package/dist/node-esm/src/platform_browser/messagechannel/promise.d.ts +33 -0
  256. package/dist/node-esm/src/platform_browser/messagechannel/promise.test.d.ts +17 -0
  257. package/dist/node-esm/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  258. package/dist/node-esm/src/platform_browser/messagechannel/receiver.test.d.ts +17 -0
  259. package/dist/node-esm/src/platform_browser/messagechannel/sender.d.ts +46 -0
  260. package/dist/node-esm/src/platform_browser/messagechannel/sender.test.d.ts +17 -0
  261. package/dist/node-esm/src/platform_browser/mfa/assertions/phone.d.ts +56 -0
  262. package/dist/node-esm/src/platform_browser/mfa/assertions/phone.test.d.ts +17 -0
  263. package/dist/node-esm/src/platform_browser/persistence/browser.d.ts +27 -0
  264. package/dist/node-esm/src/platform_browser/persistence/browser.test.d.ts +17 -0
  265. package/dist/node-esm/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  266. package/dist/node-esm/src/platform_browser/persistence/indexed_db.test.d.ts +17 -0
  267. package/dist/node-esm/src/platform_browser/persistence/local_storage.d.ts +25 -0
  268. package/dist/node-esm/src/platform_browser/persistence/local_storage.test.d.ts +17 -0
  269. package/dist/node-esm/src/platform_browser/persistence/session_storage.d.ts +24 -0
  270. package/dist/node-esm/src/platform_browser/persistence/session_storage.test.d.ts +17 -0
  271. package/dist/node-esm/src/platform_browser/popup_redirect.d.ts +24 -0
  272. package/dist/node-esm/src/platform_browser/popup_redirect.test.d.ts +17 -0
  273. package/dist/node-esm/src/platform_browser/providers/phone.d.ts +149 -0
  274. package/dist/node-esm/src/platform_browser/providers/phone.test.d.ts +17 -0
  275. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha.d.ts +23 -0
  276. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_loader.d.ts +44 -0
  277. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_loader.test.d.ts +17 -0
  278. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_mock.d.ts +51 -0
  279. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_mock.test.d.ts +17 -0
  280. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +94 -0
  281. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.test.d.ts +17 -0
  282. package/dist/node-esm/src/platform_browser/strategies/phone.d.ts +98 -0
  283. package/dist/node-esm/src/platform_browser/strategies/phone.test.d.ts +17 -0
  284. package/dist/node-esm/src/platform_browser/strategies/popup.d.ts +103 -0
  285. package/dist/node-esm/src/platform_browser/strategies/popup.test.d.ts +17 -0
  286. package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +156 -0
  287. package/dist/node-esm/src/platform_browser/strategies/redirect.test.d.ts +17 -0
  288. package/dist/node-esm/src/platform_browser/util/popup.d.ts +24 -0
  289. package/dist/node-esm/src/platform_browser/util/popup.test.d.ts +17 -0
  290. package/dist/node-esm/src/platform_browser/util/worker.d.ts +20 -0
  291. package/dist/node-esm/src/platform_cordova/plugins.d.ts +42 -0
  292. package/dist/node-esm/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  293. package/dist/node-esm/src/platform_cordova/popup_redirect/events.test.d.ts +17 -0
  294. package/dist/node-esm/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  295. package/dist/node-esm/src/platform_cordova/popup_redirect/popup_redirect.test.d.ts +17 -0
  296. package/dist/node-esm/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  297. package/dist/node-esm/src/platform_cordova/popup_redirect/utils.test.d.ts +17 -0
  298. package/dist/node-esm/src/platform_cordova/strategies/redirect.d.ts +20 -0
  299. package/dist/node-esm/src/platform_node/index.d.ts +49 -0
  300. package/dist/node-esm/src/platform_react_native/persistence/react_native.d.ts +31 -0
  301. package/dist/node-esm/src/platform_react_native/persistence/react_native.test.d.ts +17 -0
  302. package/dist/node-esm/test/helpers/api/helper.d.ts +20 -0
  303. package/dist/node-esm/test/helpers/delay.d.ts +20 -0
  304. package/dist/node-esm/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  305. package/dist/node-esm/test/helpers/fake_service_worker.d.ts +22 -0
  306. package/dist/node-esm/test/helpers/id_token_response.d.ts +18 -0
  307. package/dist/node-esm/test/helpers/iframe_event.d.ts +19 -0
  308. package/dist/node-esm/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  309. package/dist/node-esm/test/helpers/integration/helpers.d.ts +20 -0
  310. package/dist/node-esm/test/helpers/integration/settings.d.ts +23 -0
  311. package/dist/node-esm/test/helpers/jwt.d.ts +17 -0
  312. package/dist/node-esm/test/helpers/mock_auth.d.ts +37 -0
  313. package/dist/node-esm/test/helpers/mock_auth_credential.d.ts +31 -0
  314. package/dist/node-esm/test/helpers/mock_fetch.d.ts +30 -0
  315. package/dist/node-esm/test/helpers/mock_fetch.test.d.ts +17 -0
  316. package/dist/node-esm/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  317. package/dist/node-esm/test/helpers/redirect_persistence.d.ts +24 -0
  318. package/dist/node-esm/test/helpers/timeout_stub.d.ts +34 -0
  319. package/dist/node-esm/test/integration/flows/anonymous.test.d.ts +17 -0
  320. package/dist/node-esm/test/integration/flows/custom.local.test.d.ts +17 -0
  321. package/dist/node-esm/test/integration/flows/email.test.d.ts +17 -0
  322. package/dist/node-esm/test/integration/flows/idp.local.test.d.ts +17 -0
  323. package/dist/node-esm/test/integration/flows/oob.local.test.d.ts +17 -0
  324. package/dist/node-esm/test/integration/flows/phone.test.d.ts +17 -0
  325. package/dist/node-esm/test/integration/webdriver/anonymous.test.d.ts +17 -0
  326. package/dist/node-esm/test/integration/webdriver/compat/firebaseui.test.d.ts +17 -0
  327. package/dist/node-esm/test/integration/webdriver/persistence.test.d.ts +17 -0
  328. package/dist/node-esm/test/integration/webdriver/popup.test.d.ts +17 -0
  329. package/dist/node-esm/test/integration/webdriver/redirect.test.d.ts +17 -0
  330. package/dist/node-esm/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  331. package/dist/node-esm/test/integration/webdriver/util/functions.d.ts +77 -0
  332. package/dist/node-esm/test/integration/webdriver/util/idp_page.d.ts +31 -0
  333. package/dist/node-esm/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  334. package/dist/node-esm/test/integration/webdriver/util/test_runner.d.ts +19 -0
  335. package/dist/node-esm/test/integration/webdriver/util/test_server.d.ts +27 -0
  336. package/dist/node-esm/test/integration/webdriver/util/ui_page.d.ts +33 -0
  337. package/dist/rn/index.js +70 -64
  338. package/dist/rn/index.js.map +1 -1
  339. package/dist/rn/index.rn.d.ts +3 -0
  340. package/dist/rn/internal.js +338 -1465
  341. package/dist/rn/internal.js.map +1 -1
  342. package/dist/rn/{enum_maps-81db3ff6.js → phone-fe0b5242.js} +1195 -34
  343. package/dist/rn/phone-fe0b5242.js.map +1 -0
  344. package/dist/rn/src/core/errors.d.ts +2 -2
  345. package/dist/rn/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  346. package/dist/rn/src/mfa/mfa_error.d.ts +4 -5
  347. package/dist/rn/src/model/public_types.d.ts +25 -19
  348. package/dist/rn/src/platform_browser/persistence/browser.d.ts +4 -3
  349. package/dist/rn/src/platform_browser/persistence/browser.test.d.ts +17 -0
  350. package/dist/rn/src/platform_browser/strategies/phone.d.ts +3 -0
  351. package/dist/rn/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  352. package/dist/src/core/errors.d.ts +2 -2
  353. package/dist/src/core/strategies/abstract_popup_redirect_operation.d.ts +1 -1
  354. package/dist/src/mfa/mfa_error.d.ts +4 -5
  355. package/dist/src/model/public_types.d.ts +25 -19
  356. package/dist/src/platform_browser/persistence/browser.d.ts +4 -3
  357. package/dist/src/platform_browser/persistence/browser.test.d.ts +17 -0
  358. package/dist/src/platform_browser/strategies/phone.d.ts +3 -0
  359. package/dist/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  360. package/package.json +31 -9
  361. package/dist/cordova/popup_redirect-f608cd47.js.map +0 -1
  362. package/dist/esm2017/index-f41a0691.js.map +0 -1
  363. package/dist/esm5/index-fd8b7af5.js.map +0 -1
  364. package/dist/node/index-358613ec.js.map +0 -1
  365. package/dist/rn/enum_maps-81db3ff6.js.map +0 -1
@@ -0,0 +1,1139 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 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 { FirebaseApp } from '@firebase/app';
18
+ import { CompleteFn, ErrorFn, FirebaseError, NextFn, Observer, Unsubscribe } from '@firebase/util';
19
+ import { FactorId as FactorIdMap, OperationType as OperationTypeMap, ActionCodeOperation as ActionCodeOperationMap } from './enum_maps';
20
+ export { CompleteFn, ErrorFn, NextFn, Unsubscribe };
21
+ /**
22
+ * Interface representing the `Auth` config.
23
+ *
24
+ * @public
25
+ */
26
+ export interface Config {
27
+ /**
28
+ * The API Key used to communicate with the Firebase Auth backend.
29
+ */
30
+ apiKey: string;
31
+ /**
32
+ * The host at which the Firebase Auth backend is running.
33
+ */
34
+ apiHost: string;
35
+ /**
36
+ * The scheme used to communicate with the Firebase Auth backend.
37
+ */
38
+ apiScheme: string;
39
+ /**
40
+ * The host at which the Secure Token API is running.
41
+ */
42
+ tokenApiHost: string;
43
+ /**
44
+ * The SDK Client Version.
45
+ */
46
+ sdkClientVersion: string;
47
+ /**
48
+ * The domain at which the web widgets are hosted (provided via Firebase Config).
49
+ */
50
+ authDomain?: string;
51
+ }
52
+ /**
53
+ * Interface representing reCAPTCHA parameters.
54
+ *
55
+ * See the [reCAPTCHA docs](https://developers.google.com/recaptcha/docs/display#render_param)
56
+ * for the list of accepted parameters. All parameters are accepted except for `sitekey`: Firebase Auth
57
+ * provisions a reCAPTCHA for each project and will configure the site key upon rendering.
58
+ *
59
+ * For an invisible reCAPTCHA, set the `size` key to `invisible`.
60
+ *
61
+ * @public
62
+ */
63
+ export interface RecaptchaParameters {
64
+ [key: string]: any;
65
+ }
66
+ /**
67
+ * Interface representing a parsed ID token.
68
+ *
69
+ * @privateRemarks TODO(avolkovi): consolidate with parsed_token in implementation.
70
+ *
71
+ * @public
72
+ */
73
+ export interface ParsedToken {
74
+ /** Expiration time of the token. */
75
+ 'exp'?: string;
76
+ /** UID of the user. */
77
+ 'sub'?: string;
78
+ /** Time at which authentication was performed. */
79
+ 'auth_time'?: string;
80
+ /** Issuance time of the token. */
81
+ 'iat'?: string;
82
+ /** Firebase specific claims, containing the provider(s) used to authenticate the user. */
83
+ 'firebase'?: {
84
+ 'sign_in_provider'?: string;
85
+ 'sign_in_second_factor'?: string;
86
+ };
87
+ /** Map of any additional custom claims. */
88
+ [key: string]: string | object | undefined;
89
+ }
90
+ /**
91
+ * Type definition for an event callback.
92
+ *
93
+ * @privateRemarks TODO(avolkovi): should we consolidate with Subscribe<T> since we're changing the API anyway?
94
+ *
95
+ * @public
96
+ */
97
+ export declare type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;
98
+ /**
99
+ * Interface for an `Auth` error.
100
+ *
101
+ * @public
102
+ */
103
+ export interface AuthError extends FirebaseError {
104
+ /** Details about the Firebase Auth error. */
105
+ readonly customData: {
106
+ /** The name of the Firebase App which triggered this error. */
107
+ readonly appName: string;
108
+ /** The email address of the user's account, used for sign-in and linking. */
109
+ readonly email?: string;
110
+ /** The phone number of the user's account, used for sign-in and linking. */
111
+ readonly phoneNumber?: string;
112
+ /**
113
+ * The tenant ID being used for sign-in and linking.
114
+ *
115
+ * @remarks
116
+ * If you use {@link signInWithRedirect} to sign in,
117
+ * you have to set the tenant ID on the {@link Auth} instance again as the tenant ID is not persisted
118
+ * after redirection.
119
+ */
120
+ readonly tenantId?: string;
121
+ };
122
+ }
123
+ /**
124
+ * Interface representing an {@link Auth} instance's settings.
125
+ *
126
+ * @remarks Currently used for enabling/disabling app verification for phone Auth testing.
127
+ *
128
+ * @public
129
+ */
130
+ export interface AuthSettings {
131
+ /**
132
+ * When set, this property disables app verification for the purpose of testing phone
133
+ * authentication. For this property to take effect, it needs to be set before rendering a
134
+ * reCAPTCHA app verifier. When this is disabled, a mock reCAPTCHA is rendered instead. This is
135
+ * useful for manual testing during development or for automated integration tests.
136
+ *
137
+ * In order to use this feature, you will need to
138
+ * {@link https://firebase.google.com/docs/auth/web/phone-auth#test-with-whitelisted-phone-numbers | whitelist your phone number}
139
+ * via the Firebase Console.
140
+ *
141
+ * The default value is false (app verification is enabled).
142
+ */
143
+ appVerificationDisabledForTesting: boolean;
144
+ }
145
+ /**
146
+ * Interface representing Firebase Auth service.
147
+ *
148
+ * @remarks
149
+ * See {@link https://firebase.google.com/docs/auth/ | Firebase Authentication} for a full guide
150
+ * on how to use the Firebase Auth service.
151
+ *
152
+ * @public
153
+ */
154
+ export interface Auth {
155
+ /** The {@link @firebase/app#FirebaseApp} associated with the `Auth` service instance. */
156
+ readonly app: FirebaseApp;
157
+ /** The name of the app associated with the `Auth` service instance. */
158
+ readonly name: string;
159
+ /** The {@link Config} used to initialize this instance. */
160
+ readonly config: Config;
161
+ /**
162
+ * Changes the type of persistence on the `Auth` instance.
163
+ *
164
+ * @remarks
165
+ * This will affect the currently saved Auth session and applies this type of persistence for
166
+ * future sign-in requests, including sign-in with redirect requests.
167
+ *
168
+ * This makes it easy for a user signing in to specify whether their session should be
169
+ * remembered or not. It also makes it easier to never persist the Auth state for applications
170
+ * that are shared by other users or have sensitive data.
171
+ *
172
+ * @example
173
+ * ```javascript
174
+ * auth.setPersistence(browserSessionPersistence);
175
+ * ```
176
+ *
177
+ * @param persistence - The {@link Persistence} to use.
178
+ */
179
+ setPersistence(persistence: Persistence): Promise<void>;
180
+ /**
181
+ * The {@link Auth} instance's language code.
182
+ *
183
+ * @remarks
184
+ * This is a readable/writable property. When set to null, the default Firebase Console language
185
+ * setting is applied. The language code will propagate to email action templates (password
186
+ * reset, email verification and email change revocation), SMS templates for phone authentication,
187
+ * reCAPTCHA verifier and OAuth popup/redirect operations provided the specified providers support
188
+ * localization with the language code specified.
189
+ */
190
+ languageCode: string | null;
191
+ /**
192
+ * The {@link Auth} instance's tenant ID.
193
+ *
194
+ * @remarks
195
+ * This is a readable/writable property. When you set the tenant ID of an {@link Auth} instance, all
196
+ * future sign-in/sign-up operations will pass this tenant ID and sign in or sign up users to
197
+ * the specified tenant project. When set to null, users are signed in to the parent project.
198
+ *
199
+ * @example
200
+ * ```javascript
201
+ * // Set the tenant ID on Auth instance.
202
+ * auth.tenantId = 'TENANT_PROJECT_ID';
203
+ *
204
+ * // All future sign-in request now include tenant ID.
205
+ * const result = await signInWithEmailAndPassword(auth, email, password);
206
+ * // result.user.tenantId should be 'TENANT_PROJECT_ID'.
207
+ * ```
208
+ *
209
+ * @defaultValue null
210
+ */
211
+ tenantId: string | null;
212
+ /**
213
+ * The {@link Auth} instance's settings.
214
+ *
215
+ * @remarks
216
+ * This is used to edit/read configuration related options such as app verification mode for
217
+ * phone authentication.
218
+ */
219
+ readonly settings: AuthSettings;
220
+ /**
221
+ * Adds an observer for changes to the user's sign-in state.
222
+ *
223
+ * @remarks
224
+ * To keep the old behavior, see {@link Auth.onIdTokenChanged}.
225
+ *
226
+ * @param nextOrObserver - callback triggered on change.
227
+ * @param error - callback triggered on error.
228
+ * @param completed - callback triggered when observer is removed.
229
+ */
230
+ onAuthStateChanged(nextOrObserver: NextOrObserver<User | null>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
231
+ /**
232
+ * Adds an observer for changes to the signed-in user's ID token.
233
+ *
234
+ * @remarks
235
+ * This includes sign-in, sign-out, and token refresh events.
236
+ *
237
+ * @param nextOrObserver - callback triggered on change.
238
+ * @param error - callback triggered on error.
239
+ * @param completed - callback triggered when observer is removed.
240
+ */
241
+ onIdTokenChanged(nextOrObserver: NextOrObserver<User | null>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
242
+ /** The currently signed-in user (or null). */
243
+ readonly currentUser: User | null;
244
+ /** The current emulator configuration (or null). */
245
+ readonly emulatorConfig: EmulatorConfig | null;
246
+ /**
247
+ * Asynchronously sets the provided user as {@link Auth.currentUser} on the {@link Auth} instance.
248
+ *
249
+ * @remarks
250
+ * A new instance copy of the user provided will be made and set as currentUser.
251
+ *
252
+ * This will trigger {@link Auth.onAuthStateChanged} and {@link Auth.onIdTokenChanged} listeners
253
+ * like other sign in methods.
254
+ *
255
+ * The operation fails with an error if the user to be updated belongs to a different Firebase
256
+ * project.
257
+ *
258
+ * @param user - The new {@link User}.
259
+ */
260
+ updateCurrentUser(user: User | null): Promise<void>;
261
+ /**
262
+ * Sets the current language to the default device/browser preference.
263
+ */
264
+ useDeviceLanguage(): void;
265
+ /**
266
+ * Signs out the current user.
267
+ */
268
+ signOut(): Promise<void>;
269
+ }
270
+ /**
271
+ * An interface covering the possible persistence mechanism types.
272
+ *
273
+ * @public
274
+ */
275
+ export interface Persistence {
276
+ /**
277
+ * Type of Persistence.
278
+ * - 'SESSION' is used for temporary persistence such as `sessionStorage`.
279
+ * - 'LOCAL' is used for long term persistence such as `localStorage` or `IndexedDB`.
280
+ * - 'NONE' is used for in-memory, or no persistence.
281
+ */
282
+ readonly type: 'SESSION' | 'LOCAL' | 'NONE';
283
+ }
284
+ /**
285
+ * Interface representing ID token result obtained from {@link User.getIdTokenResult}.
286
+ *
287
+ * @remarks
288
+ * `IdTokenResult` contains the ID token JWT string and other helper properties for getting different data
289
+ * associated with the token as well as all the decoded payload claims.
290
+ *
291
+ * Note that these claims are not to be trusted as they are parsed client side. Only server side
292
+ * verification can guarantee the integrity of the token claims.
293
+ *
294
+ * @public
295
+ */
296
+ export interface IdTokenResult {
297
+ /**
298
+ * The authentication time formatted as a UTC string.
299
+ *
300
+ * @remarks
301
+ * This is the time the user authenticated (signed in) and not the time the token was refreshed.
302
+ */
303
+ authTime: string;
304
+ /** The ID token expiration time formatted as a UTC string. */
305
+ expirationTime: string;
306
+ /** The ID token issuance time formatted as a UTC string. */
307
+ issuedAtTime: string;
308
+ /**
309
+ * The sign-in provider through which the ID token was obtained (anonymous, custom, phone,
310
+ * password, etc).
311
+ *
312
+ * @remarks
313
+ * Note, this does not map to provider IDs.
314
+ */
315
+ signInProvider: string | null;
316
+ /**
317
+ * The type of second factor associated with this session, provided the user was multi-factor
318
+ * authenticated (eg. phone, etc).
319
+ */
320
+ signInSecondFactor: string | null;
321
+ /** The Firebase Auth ID token JWT string. */
322
+ token: string;
323
+ /**
324
+ * The entire payload claims of the ID token including the standard reserved claims as well as
325
+ * the custom claims.
326
+ */
327
+ claims: ParsedToken;
328
+ }
329
+ /**
330
+ * A response from {@link checkActionCode}.
331
+ *
332
+ * @public
333
+ */
334
+ export interface ActionCodeInfo {
335
+ /**
336
+ * The data associated with the action code.
337
+ *
338
+ * @remarks
339
+ * For the {@link ActionCodeOperation}.PASSWORD_RESET, {@link ActionCodeOperation}.VERIFY_EMAIL, and
340
+ * {@link ActionCodeOperation}.RECOVER_EMAIL actions, this object contains an email field with the address
341
+ * the email was sent to.
342
+ *
343
+ * For the {@link ActionCodeOperation}.RECOVER_EMAIL action, which allows a user to undo an email address
344
+ * change, this object also contains a `previousEmail` field with the user account's current
345
+ * email address. After the action completes, the user's email address will revert to the value
346
+ * in the `email` field from the value in `previousEmail` field.
347
+ *
348
+ * For the {@link ActionCodeOperation}.VERIFY_AND_CHANGE_EMAIL action, which allows a user to verify the
349
+ * email before updating it, this object contains a `previousEmail` field with the user account's
350
+ * email address before updating. After the action completes, the user's email address will be
351
+ * updated to the value in the `email` field from the value in `previousEmail` field.
352
+ *
353
+ * For the {@link ActionCodeOperation}.REVERT_SECOND_FACTOR_ADDITION action, which allows a user to
354
+ * unenroll a newly added second factor, this object contains a `multiFactorInfo` field with
355
+ * the information about the second factor. For phone second factor, the `multiFactorInfo`
356
+ * is a {@link MultiFactorInfo} object, which contains the phone number.
357
+ */
358
+ data: {
359
+ email?: string | null;
360
+ multiFactorInfo?: MultiFactorInfo | null;
361
+ previousEmail?: string | null;
362
+ };
363
+ /**
364
+ * The type of operation that generated the action code.
365
+ */
366
+ operation: typeof ActionCodeOperationMap[keyof typeof ActionCodeOperationMap];
367
+ }
368
+ /**
369
+ * An enumeration of the possible email action types.
370
+ *
371
+ * @internal
372
+ */
373
+ export declare const enum ActionCodeOperation {
374
+ /** The email link sign-in action. */
375
+ EMAIL_SIGNIN = "EMAIL_SIGNIN",
376
+ /** The password reset action. */
377
+ PASSWORD_RESET = "PASSWORD_RESET",
378
+ /** The email revocation action. */
379
+ RECOVER_EMAIL = "RECOVER_EMAIL",
380
+ /** The revert second factor addition email action. */
381
+ REVERT_SECOND_FACTOR_ADDITION = "REVERT_SECOND_FACTOR_ADDITION",
382
+ /** The revert second factor addition email action. */
383
+ VERIFY_AND_CHANGE_EMAIL = "VERIFY_AND_CHANGE_EMAIL",
384
+ /** The email verification action. */
385
+ VERIFY_EMAIL = "VERIFY_EMAIL"
386
+ }
387
+ /**
388
+ * An interface that defines the required continue/state URL with optional Android and iOS
389
+ * bundle identifiers.
390
+ *
391
+ * @public
392
+ */
393
+ export interface ActionCodeSettings {
394
+ /**
395
+ * Sets the Android package name.
396
+ *
397
+ * @remarks
398
+ * This will try to open the link in an android app if it is
399
+ * installed. If `installApp` is passed, it specifies whether to install the Android app if the
400
+ * device supports it and the app is not already installed. If this field is provided without
401
+ * a `packageName`, an error is thrown explaining that the `packageName` must be provided in
402
+ * conjunction with this field. If `minimumVersion` is specified, and an older version of the
403
+ * app is installed, the user is taken to the Play Store to upgrade the app.
404
+ */
405
+ android?: {
406
+ installApp?: boolean;
407
+ minimumVersion?: string;
408
+ packageName: string;
409
+ };
410
+ /**
411
+ * When set to true, the action code link will be be sent as a Universal Link or Android App
412
+ * Link and will be opened by the app if installed.
413
+ *
414
+ * @remarks
415
+ * In the false case, the code will be sent to the web widget first and then on continue will
416
+ * redirect to the app if installed.
417
+ *
418
+ * @defaultValue false
419
+ */
420
+ handleCodeInApp?: boolean;
421
+ /**
422
+ * Sets the iOS bundle ID.
423
+ *
424
+ * @remarks
425
+ * This will try to open the link in an iOS app if it is installed.
426
+ *
427
+ * App installation is not supported for iOS.
428
+ */
429
+ iOS?: {
430
+ bundleId: string;
431
+ };
432
+ /**
433
+ * Sets the link continue/state URL.
434
+ *
435
+ * @remarks
436
+ * This has different meanings in different contexts:
437
+ * - When the link is handled in the web action widgets, this is the deep link in the
438
+ * `continueUrl` query parameter.
439
+ * - When the link is handled in the app directly, this is the `continueUrl` query parameter in
440
+ * the deep link of the Dynamic Link.
441
+ */
442
+ url: string;
443
+ /**
444
+ * When multiple custom dynamic link domains are defined for a project, specify which one to use
445
+ * when the link is to be opened via a specified mobile app (for example, `example.page.link`).
446
+ *
447
+ *
448
+ * @defaultValue The first domain is automatically selected.
449
+ */
450
+ dynamicLinkDomain?: string;
451
+ }
452
+ /**
453
+ * A verifier for domain verification and abuse prevention.
454
+ *
455
+ * @remarks
456
+ * Currently, the only implementation is {@link RecaptchaVerifier}.
457
+ *
458
+ * @public
459
+ */
460
+ export interface ApplicationVerifier {
461
+ /**
462
+ * Identifies the type of application verifier (e.g. "recaptcha").
463
+ */
464
+ readonly type: string;
465
+ /**
466
+ * Executes the verification process.
467
+ *
468
+ * @returns A Promise for a token that can be used to assert the validity of a request.
469
+ */
470
+ verify(): Promise<string>;
471
+ }
472
+ /**
473
+ * Interface that represents an auth provider, used to facilitate creating {@link AuthCredential}.
474
+ *
475
+ * @public
476
+ */
477
+ export interface AuthProvider {
478
+ /**
479
+ * Provider for which credentials can be constructed.
480
+ */
481
+ readonly providerId: string;
482
+ }
483
+ /**
484
+ * An enum of factors that may be used for multifactor authentication.
485
+ *
486
+ * @internal
487
+ */
488
+ export declare const enum FactorId {
489
+ /** Phone as second factor */
490
+ PHONE = "phone"
491
+ }
492
+ /**
493
+ * A result from a phone number sign-in, link, or reauthenticate call.
494
+ *
495
+ * @public
496
+ */
497
+ export interface ConfirmationResult {
498
+ /**
499
+ * The phone number authentication operation's verification ID.
500
+ *
501
+ * @remarks
502
+ * This can be used along with the verification code to initialize a
503
+ * {@link PhoneAuthCredential}.
504
+ */
505
+ readonly verificationId: string;
506
+ /**
507
+ * Finishes a phone number sign-in, link, or reauthentication.
508
+ *
509
+ * @example
510
+ * ```javascript
511
+ * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
512
+ * // Obtain verificationCode from the user.
513
+ * const userCredential = await confirmationResult.confirm(verificationCode);
514
+ * ```
515
+ *
516
+ * @param verificationCode - The code that was sent to the user's mobile device.
517
+ */
518
+ confirm(verificationCode: string): Promise<UserCredential>;
519
+ }
520
+ /**
521
+ * The base class for asserting ownership of a second factor.
522
+ *
523
+ * @remarks
524
+ * This is used to facilitate enrollment of a second factor on an existing user or sign-in of a
525
+ * user who already verified the first factor.
526
+ *
527
+ * @public
528
+ */
529
+ export interface MultiFactorAssertion {
530
+ /** The identifier of the second factor. */
531
+ readonly factorId: typeof FactorIdMap[keyof typeof FactorIdMap];
532
+ }
533
+ /**
534
+ * The error thrown when the user needs to provide a second factor to sign in successfully.
535
+ *
536
+ * @remarks
537
+ * The error code for this error is `auth/multi-factor-auth-required`.
538
+ *
539
+ * @example
540
+ * ```javascript
541
+ * let resolver;
542
+ * let multiFactorHints;
543
+ *
544
+ * signInWithEmailAndPassword(auth, email, password)
545
+ * .then((result) => {
546
+ * // User signed in. No 2nd factor challenge is needed.
547
+ * })
548
+ * .catch((error) => {
549
+ * if (error.code == 'auth/multi-factor-auth-required') {
550
+ * resolver = getMultiFactorResolver(auth, error);
551
+ * multiFactorHints = resolver.hints;
552
+ * } else {
553
+ * // Handle other errors.
554
+ * }
555
+ * });
556
+ *
557
+ * // Obtain a multiFactorAssertion by verifying the second factor.
558
+ *
559
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
560
+ * ```
561
+ *
562
+ * @public
563
+ */
564
+ export interface MultiFactorError extends AuthError {
565
+ /** Details about the MultiFactorError. */
566
+ readonly customData: AuthError['customData'] & {
567
+ /**
568
+ * The type of operation (sign-in, linking, or re-authentication) that raised the error.
569
+ */
570
+ readonly operationType: typeof OperationTypeMap[keyof typeof OperationTypeMap];
571
+ };
572
+ }
573
+ /**
574
+ * A structure containing the information of a second factor entity.
575
+ *
576
+ * @public
577
+ */
578
+ export interface MultiFactorInfo {
579
+ /** The multi-factor enrollment ID. */
580
+ readonly uid: string;
581
+ /** The user friendly name of the current second factor. */
582
+ readonly displayName?: string | null;
583
+ /** The enrollment date of the second factor formatted as a UTC string. */
584
+ readonly enrollmentTime: string;
585
+ /** The identifier of the second factor. */
586
+ readonly factorId: typeof FactorIdMap[keyof typeof FactorIdMap];
587
+ }
588
+ /**
589
+ * The class used to facilitate recovery from {@link MultiFactorError} when a user needs to
590
+ * provide a second factor to sign in.
591
+ *
592
+ * @example
593
+ * ```javascript
594
+ * let resolver;
595
+ * let multiFactorHints;
596
+ *
597
+ * signInWithEmailAndPassword(auth, email, password)
598
+ * .then((result) => {
599
+ * // User signed in. No 2nd factor challenge is needed.
600
+ * })
601
+ * .catch((error) => {
602
+ * if (error.code == 'auth/multi-factor-auth-required') {
603
+ * resolver = getMultiFactorResolver(auth, error);
604
+ * // Show UI to let user select second factor.
605
+ * multiFactorHints = resolver.hints;
606
+ * } else {
607
+ * // Handle other errors.
608
+ * }
609
+ * });
610
+ *
611
+ * // The enrolled second factors that can be used to complete
612
+ * // sign-in are returned in the `MultiFactorResolver.hints` list.
613
+ * // UI needs to be presented to allow the user to select a second factor
614
+ * // from that list.
615
+ *
616
+ * const selectedHint = // ; selected from multiFactorHints
617
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
618
+ * const phoneInfoOptions = {
619
+ * multiFactorHint: selectedHint,
620
+ * session: resolver.session
621
+ * };
622
+ * const verificationId = phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
623
+ * // Store `verificationId` and show UI to let user enter verification code.
624
+ *
625
+ * // UI to enter verification code and continue.
626
+ * // Continue button click handler
627
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
628
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
629
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
630
+ * ```
631
+ *
632
+ * @public
633
+ */
634
+ export interface MultiFactorResolver {
635
+ /**
636
+ * The list of hints for the second factors needed to complete the sign-in for the current
637
+ * session.
638
+ */
639
+ readonly hints: MultiFactorInfo[];
640
+ /**
641
+ * The session identifier for the current sign-in flow, which can be used to complete the second
642
+ * factor sign-in.
643
+ */
644
+ readonly session: MultiFactorSession;
645
+ /**
646
+ * A helper function to help users complete sign in with a second factor using an
647
+ * {@link MultiFactorAssertion} confirming the user successfully completed the second factor
648
+ * challenge.
649
+ *
650
+ * @example
651
+ * ```javascript
652
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
653
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
654
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
655
+ * ```
656
+ *
657
+ * @param assertion - The multi-factor assertion to resolve sign-in with.
658
+ * @returns The promise that resolves with the user credential object.
659
+ */
660
+ resolveSignIn(assertion: MultiFactorAssertion): Promise<UserCredential>;
661
+ }
662
+ /**
663
+ * An interface defining the multi-factor session object used for enrolling a second factor on a
664
+ * user or helping sign in an enrolled user with a second factor.
665
+ *
666
+ * @public
667
+ */
668
+ export interface MultiFactorSession {
669
+ }
670
+ /**
671
+ * An interface that defines the multi-factor related properties and operations pertaining
672
+ * to a {@link User}.
673
+ *
674
+ * @public
675
+ */
676
+ export interface MultiFactorUser {
677
+ /** Returns a list of the user's enrolled second factors. */
678
+ readonly enrolledFactors: MultiFactorInfo[];
679
+ /**
680
+ * Returns the session identifier for a second factor enrollment operation. This is used to
681
+ * identify the user trying to enroll a second factor.
682
+ *
683
+ * @example
684
+ * ```javascript
685
+ * const multiFactorUser = multiFactor(auth.currentUser);
686
+ * const multiFactorSession = await multiFactorUser.getSession();
687
+ *
688
+ * // Send verification code.
689
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
690
+ * const phoneInfoOptions = {
691
+ * phoneNumber: phoneNumber,
692
+ * session: multiFactorSession
693
+ * };
694
+ * const verificationId = await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
695
+ *
696
+ * // Obtain verification code from user.
697
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
698
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
699
+ * await multiFactorUser.enroll(multiFactorAssertion);
700
+ * ```
701
+ *
702
+ * @returns The promise that resolves with the {@link MultiFactorSession}.
703
+ */
704
+ getSession(): Promise<MultiFactorSession>;
705
+ /**
706
+ *
707
+ * Enrolls a second factor as identified by the {@link MultiFactorAssertion} for the
708
+ * user.
709
+ *
710
+ * @remarks
711
+ * On resolution, the user tokens are updated to reflect the change in the JWT payload.
712
+ * Accepts an additional display name parameter used to identify the second factor to the end
713
+ * user. Recent re-authentication is required for this operation to succeed. On successful
714
+ * enrollment, existing Firebase sessions (refresh tokens) are revoked. When a new factor is
715
+ * enrolled, an email notification is sent to the user’s email.
716
+ *
717
+ * @example
718
+ * ```javascript
719
+ * const multiFactorUser = multiFactor(auth.currentUser);
720
+ * const multiFactorSession = await multiFactorUser.getSession();
721
+ *
722
+ * // Send verification code.
723
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
724
+ * const phoneInfoOptions = {
725
+ * phoneNumber: phoneNumber,
726
+ * session: multiFactorSession
727
+ * };
728
+ * const verificationId = await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
729
+ *
730
+ * // Obtain verification code from user.
731
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
732
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
733
+ * await multiFactorUser.enroll(multiFactorAssertion);
734
+ * // Second factor enrolled.
735
+ * ```
736
+ *
737
+ * @param assertion - The multi-factor assertion to enroll with.
738
+ * @param displayName - The display name of the second factor.
739
+ */
740
+ enroll(assertion: MultiFactorAssertion, displayName?: string | null): Promise<void>;
741
+ /**
742
+ * Unenrolls the specified second factor.
743
+ *
744
+ * @remarks
745
+ * To specify the factor to remove, pass a {@link MultiFactorInfo} object (retrieved from
746
+ * {@link MultiFactorUser.enrolledFactors}) or the
747
+ * factor's UID string. Sessions are not revoked when the account is unenrolled. An email
748
+ * notification is likely to be sent to the user notifying them of the change. Recent
749
+ * re-authentication is required for this operation to succeed. When an existing factor is
750
+ * unenrolled, an email notification is sent to the user’s email.
751
+ *
752
+ * @example
753
+ * ```javascript
754
+ * const multiFactorUser = multiFactor(auth.currentUser);
755
+ * // Present user the option to choose which factor to unenroll.
756
+ * await multiFactorUser.unenroll(multiFactorUser.enrolledFactors[i])
757
+ * ```
758
+ *
759
+ * @param option - The multi-factor option to unenroll.
760
+ * @returns - A `Promise` which resolves when the unenroll operation is complete.
761
+ */
762
+ unenroll(option: MultiFactorInfo | string): Promise<void>;
763
+ }
764
+ /**
765
+ * The class for asserting ownership of a phone second factor. Provided by
766
+ * {@link PhoneMultiFactorGenerator.assertion}.
767
+ *
768
+ * @public
769
+ */
770
+ export interface PhoneMultiFactorAssertion extends MultiFactorAssertion {
771
+ }
772
+ /**
773
+ * The information required to verify the ownership of a phone number.
774
+ *
775
+ * @remarks
776
+ * The information that's required depends on whether you are doing single-factor sign-in,
777
+ * multi-factor enrollment or multi-factor sign-in.
778
+ *
779
+ * @public
780
+ */
781
+ export declare type PhoneInfoOptions = PhoneSingleFactorInfoOptions | PhoneMultiFactorEnrollInfoOptions | PhoneMultiFactorSignInInfoOptions;
782
+ /**
783
+ * Options used for single-factor sign-in.
784
+ *
785
+ * @public
786
+ */
787
+ export interface PhoneSingleFactorInfoOptions {
788
+ /** Phone number to send a verification code to. */
789
+ phoneNumber: string;
790
+ }
791
+ /**
792
+ * Options used for enrolling a second factor.
793
+ *
794
+ * @public
795
+ */
796
+ export interface PhoneMultiFactorEnrollInfoOptions {
797
+ /** Phone number to send a verification code to. */
798
+ phoneNumber: string;
799
+ /** The {@link MultiFactorSession} obtained via {@link MultiFactorUser.getSession}. */
800
+ session: MultiFactorSession;
801
+ }
802
+ /**
803
+ * Options used for signing-in with a second factor.
804
+ *
805
+ * @public
806
+ */
807
+ export interface PhoneMultiFactorSignInInfoOptions {
808
+ /**
809
+ * The {@link MultiFactorInfo} obtained via {@link MultiFactorResolver.hints}.
810
+ *
811
+ * One of `multiFactorHint` or `multiFactorUid` is required.
812
+ */
813
+ multiFactorHint?: MultiFactorInfo;
814
+ /**
815
+ * The uid of the second factor.
816
+ *
817
+ * One of `multiFactorHint` or `multiFactorUid` is required.
818
+ */
819
+ multiFactorUid?: string;
820
+ /** The {@link MultiFactorSession} obtained via {@link MultiFactorResolver.session}. */
821
+ session: MultiFactorSession;
822
+ }
823
+ /**
824
+ * Interface for a supplied `AsyncStorage`.
825
+ *
826
+ * @public
827
+ */
828
+ export interface ReactNativeAsyncStorage {
829
+ /**
830
+ * Persist an item in storage.
831
+ *
832
+ * @param key - storage key.
833
+ * @param value - storage value.
834
+ */
835
+ setItem(key: string, value: string): Promise<void>;
836
+ /**
837
+ * Retrieve an item from storage.
838
+ *
839
+ * @param key - storage key.
840
+ */
841
+ getItem(key: string): Promise<string | null>;
842
+ /**
843
+ * Remove an item from storage.
844
+ *
845
+ * @param key - storage key.
846
+ */
847
+ removeItem(key: string): Promise<void>;
848
+ }
849
+ /**
850
+ * A user account.
851
+ *
852
+ * @public
853
+ */
854
+ export interface User extends UserInfo {
855
+ /**
856
+ * Whether the email has been verified with {@link sendEmailVerification} and
857
+ * {@link applyActionCode}.
858
+ */
859
+ readonly emailVerified: boolean;
860
+ /**
861
+ * Whether the user is authenticated using the {@link ProviderId}.ANONYMOUS provider.
862
+ */
863
+ readonly isAnonymous: boolean;
864
+ /**
865
+ * Additional metadata around user creation and sign-in times.
866
+ */
867
+ readonly metadata: UserMetadata;
868
+ /**
869
+ * Additional per provider such as displayName and profile information.
870
+ */
871
+ readonly providerData: UserInfo[];
872
+ /**
873
+ * Refresh token used to reauthenticate the user. Avoid using this directly and prefer
874
+ * {@link User.getIdToken} to refresh the ID token instead.
875
+ */
876
+ readonly refreshToken: string;
877
+ /**
878
+ * The user's tenant ID.
879
+ *
880
+ * @remarks
881
+ * This is a read-only property, which indicates the tenant ID
882
+ * used to sign in the user. This is null if the user is signed in from the parent
883
+ * project.
884
+ *
885
+ * @example
886
+ * ```javascript
887
+ * // Set the tenant ID on Auth instance.
888
+ * auth.tenantId = 'TENANT_PROJECT_ID';
889
+ *
890
+ * // All future sign-in request now include tenant ID.
891
+ * const result = await signInWithEmailAndPassword(auth, email, password);
892
+ * // result.user.tenantId should be 'TENANT_PROJECT_ID'.
893
+ * ```
894
+ */
895
+ readonly tenantId: string | null;
896
+ /**
897
+ * Deletes and signs out the user.
898
+ *
899
+ * @remarks
900
+ * Important: this is a security-sensitive operation that requires the user to have recently
901
+ * signed in. If this requirement isn't met, ask the user to authenticate again and then call
902
+ * one of the reauthentication methods like {@link reauthenticateWithCredential}.
903
+ */
904
+ delete(): Promise<void>;
905
+ /**
906
+ * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.
907
+ *
908
+ * @remarks
909
+ * Returns the current token if it has not expired or if it will not expire in the next five
910
+ * minutes. Otherwise, this will refresh the token and return a new one.
911
+ *
912
+ * @param forceRefresh - Force refresh regardless of token expiration.
913
+ */
914
+ getIdToken(forceRefresh?: boolean): Promise<string>;
915
+ /**
916
+ * Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service.
917
+ *
918
+ * @remarks
919
+ * Returns the current token if it has not expired or if it will not expire in the next five
920
+ * minutes. Otherwise, this will refresh the token and return a new one.
921
+ *
922
+ * @param forceRefresh - Force refresh regardless of token expiration.
923
+ */
924
+ getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
925
+ /**
926
+ * Refreshes the user, if signed in.
927
+ */
928
+ reload(): Promise<void>;
929
+ /**
930
+ * Returns a JSON-serializable representation of this object.
931
+ *
932
+ * @returns A JSON-serializable representation of this object.
933
+ */
934
+ toJSON(): object;
935
+ }
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.
939
+ *
940
+ * @remarks
941
+ * `operationType` could be {@link OperationType}.SIGN_IN for a sign-in operation,
942
+ * {@link OperationType}.LINK for a linking operation and {@link OperationType}.REAUTHENTICATE for
943
+ * a reauthentication operation.
944
+ *
945
+ * @public
946
+ */
947
+ export interface UserCredential {
948
+ /**
949
+ * The user authenticated by this credential.
950
+ */
951
+ user: User;
952
+ /**
953
+ * The provider which was used to authenticate the user.
954
+ */
955
+ providerId: string | null;
956
+ /**
957
+ * The type of operation which was used to authenticate the user (such as sign-in or link).
958
+ */
959
+ operationType: typeof OperationTypeMap[keyof typeof OperationTypeMap];
960
+ }
961
+ /**
962
+ * User profile information, visible only to the Firebase project's apps.
963
+ *
964
+ * @public
965
+ */
966
+ export interface UserInfo {
967
+ /**
968
+ * The display name of the user.
969
+ */
970
+ readonly displayName: string | null;
971
+ /**
972
+ * The email of the user.
973
+ */
974
+ readonly email: string | null;
975
+ /**
976
+ * The phone number normalized based on the E.164 standard (e.g. +16505550101) for the
977
+ * user.
978
+ *
979
+ * @remarks
980
+ * This is null if the user has no phone credential linked to the account.
981
+ */
982
+ readonly phoneNumber: string | null;
983
+ /**
984
+ * The profile photo URL of the user.
985
+ */
986
+ readonly photoURL: string | null;
987
+ /**
988
+ * The provider used to authenticate the user.
989
+ */
990
+ readonly providerId: string;
991
+ /**
992
+ * The user's unique ID, scoped to the project.
993
+ */
994
+ readonly uid: string;
995
+ }
996
+ /**
997
+ * Interface representing a user's metadata.
998
+ *
999
+ * @public
1000
+ */
1001
+ export interface UserMetadata {
1002
+ /** Time the user was created. */
1003
+ readonly creationTime?: string;
1004
+ /** Time the user last signed in. */
1005
+ readonly lastSignInTime?: string;
1006
+ }
1007
+ /**
1008
+ * A structure containing additional user information from a federated identity provider.
1009
+ *
1010
+ * @public
1011
+ */
1012
+ export interface AdditionalUserInfo {
1013
+ /**
1014
+ * Whether the user is new (created via sign-up) or existing (authenticated using sign-in).
1015
+ */
1016
+ readonly isNewUser: boolean;
1017
+ /**
1018
+ * Map containing IDP-specific user data.
1019
+ */
1020
+ readonly profile: Record<string, unknown> | null;
1021
+ /**
1022
+ * Identifier for the provider used to authenticate this user.
1023
+ */
1024
+ readonly providerId: string | null;
1025
+ /**
1026
+ * The username if the provider is GitHub or Twitter.
1027
+ */
1028
+ readonly username?: string | null;
1029
+ }
1030
+ /**
1031
+ * User profile used in {@link AdditionalUserInfo}.
1032
+ *
1033
+ * @public
1034
+ */
1035
+ export declare type UserProfile = Record<string, unknown>;
1036
+ /**
1037
+ * A resolver used for handling DOM specific operations like {@link signInWithPopup}
1038
+ * or {@link signInWithRedirect}.
1039
+ *
1040
+ * @public
1041
+ */
1042
+ export interface PopupRedirectResolver {
1043
+ }
1044
+ declare module '@firebase/component' {
1045
+ interface NameServiceMapping {
1046
+ 'auth': Auth;
1047
+ }
1048
+ }
1049
+ /**
1050
+ * Configuration of Firebase Authentication Emulator.
1051
+ * @public
1052
+ */
1053
+ export interface EmulatorConfig {
1054
+ /**
1055
+ * The protocol used to communicate with the emulator ("http"/"https").
1056
+ */
1057
+ readonly protocol: string;
1058
+ /**
1059
+ * The hostname of the emulator, which may be a domain ("localhost"), IPv4 address ("127.0.0.1")
1060
+ * or quoted IPv6 address ("[::1]").
1061
+ */
1062
+ readonly host: string;
1063
+ /**
1064
+ * The port of the emulator, or null if port isn't specified (i.e. protocol default).
1065
+ */
1066
+ readonly port: number | null;
1067
+ /**
1068
+ * The emulator-specific options.
1069
+ */
1070
+ readonly options: {
1071
+ /**
1072
+ * Whether the warning banner attached to the DOM was disabled.
1073
+ */
1074
+ readonly disableWarnings: boolean;
1075
+ };
1076
+ }
1077
+ /**
1078
+ * A mapping of error codes to error messages.
1079
+ *
1080
+ * @remarks
1081
+ *
1082
+ * While error messages are useful for debugging (providing verbose textual
1083
+ * context around what went wrong), these strings take up a lot of space in the
1084
+ * compiled code. When deploying code in production, using {@link prodErrorMap}
1085
+ * will save you roughly 10k compressed/gzipped over {@link debugErrorMap}. You
1086
+ * can select the error map during initialization:
1087
+ *
1088
+ * ```javascript
1089
+ * initializeAuth(app, {errorMap: debugErrorMap})
1090
+ * ```
1091
+ *
1092
+ * When initializing Auth, {@link prodErrorMap} is default.
1093
+ *
1094
+ * @public
1095
+ */
1096
+ export interface AuthErrorMap {
1097
+ }
1098
+ /**
1099
+ * The dependencies that can be used to initialize an {@link Auth} instance.
1100
+ *
1101
+ * @remarks
1102
+ *
1103
+ * The modular SDK enables tree shaking by allowing explicit declarations of
1104
+ * dependencies. For example, a web app does not need to include code that
1105
+ * enables Cordova redirect sign in. That functionality is therefore split into
1106
+ * {@link browserPopupRedirectResolver} and
1107
+ * {@link cordovaPopupRedirectResolver}. The dependencies object is how Auth is
1108
+ * configured to reduce bundle sizes.
1109
+ *
1110
+ * There are two ways to initialize an {@link Auth} instance: {@link getAuth} and
1111
+ * {@link initializeAuth}. `getAuth` initializes everything using
1112
+ * platform-specific configurations, while `initializeAuth` takes a
1113
+ * `Dependencies` object directly, giving you more control over what is used.
1114
+ *
1115
+ * @public
1116
+ */
1117
+ export interface Dependencies {
1118
+ /**
1119
+ * Which {@link Persistence} to use. If this is an array, the first
1120
+ * `Persistence` that the device supports is used. The SDK searches for an
1121
+ * existing account in order and, if one is found in a secondary
1122
+ * `Persistence`, the account is moved to the primary `Persistence`.
1123
+ *
1124
+ * If no persistence is provided, the SDK falls back on
1125
+ * {@link inMemoryPersistence}.
1126
+ */
1127
+ persistence?: Persistence | Persistence[];
1128
+ /**
1129
+ * The {@link PopupRedirectResolver} to use. This value depends on the
1130
+ * platform. Options are {@link browserPopupRedirectResolver} and
1131
+ * {@link cordovaPopupRedirectResolver}. This field is optional if neither
1132
+ * {@link signInWithPopup} or {@link signInWithRedirect} are being used.
1133
+ */
1134
+ popupRedirectResolver?: PopupRedirectResolver;
1135
+ /**
1136
+ * Which {@link AuthErrorMap} to use.
1137
+ */
1138
+ errorMap?: AuthErrorMap;
1139
+ }