@depup/firebase__auth 1.12.1-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1606) hide show
  1. package/README.md +31 -0
  2. package/changes.json +10 -0
  3. package/cordova/package.json +7 -0
  4. package/dist/auth-public.d.ts +4067 -0
  5. package/dist/auth.d.ts +4634 -0
  6. package/dist/browser-cjs/index-ac6fb6b2.js +11265 -0
  7. package/dist/browser-cjs/index-ac6fb6b2.js.map +1 -0
  8. package/dist/browser-cjs/index.cordova.d.ts +32 -0
  9. package/dist/browser-cjs/index.d.ts +38 -0
  10. package/dist/browser-cjs/index.doc.d.ts +24 -0
  11. package/dist/browser-cjs/index.js +98 -0
  12. package/dist/browser-cjs/index.js.map +1 -0
  13. package/dist/browser-cjs/index.node.d.ts +17 -0
  14. package/dist/browser-cjs/index.rn.d.ts +40 -0
  15. package/dist/browser-cjs/index.shared.d.ts +19 -0
  16. package/dist/browser-cjs/index.web-extension.d.ts +31 -0
  17. package/dist/browser-cjs/index.webworker.d.ts +21 -0
  18. package/dist/browser-cjs/internal/index.d.ts +42 -0
  19. package/dist/browser-cjs/internal.js +668 -0
  20. package/dist/browser-cjs/internal.js.map +1 -0
  21. package/dist/browser-cjs/scripts/run_node_tests.d.ts +17 -0
  22. package/dist/browser-cjs/src/api/account_management/account.d.ts +59 -0
  23. package/dist/browser-cjs/src/api/account_management/email_and_password.d.ts +49 -0
  24. package/dist/browser-cjs/src/api/account_management/mfa.d.ts +107 -0
  25. package/dist/browser-cjs/src/api/account_management/profile.d.ts +29 -0
  26. package/dist/browser-cjs/src/api/authentication/create_auth_uri.d.ts +26 -0
  27. package/dist/browser-cjs/src/api/authentication/custom_token.d.ts +26 -0
  28. package/dist/browser-cjs/src/api/authentication/email_and_password.d.ts +86 -0
  29. package/dist/browser-cjs/src/api/authentication/email_link.d.ts +32 -0
  30. package/dist/browser-cjs/src/api/authentication/idp.d.ts +40 -0
  31. package/dist/browser-cjs/src/api/authentication/mfa.d.ts +73 -0
  32. package/dist/browser-cjs/src/api/authentication/recaptcha.d.ts +34 -0
  33. package/dist/browser-cjs/src/api/authentication/sign_up.d.ts +34 -0
  34. package/dist/browser-cjs/src/api/authentication/sms.d.ts +54 -0
  35. package/dist/browser-cjs/src/api/authentication/token.d.ts +37 -0
  36. package/dist/browser-cjs/src/api/errors.d.ts +129 -0
  37. package/dist/browser-cjs/src/api/index.d.ts +101 -0
  38. package/dist/browser-cjs/src/api/password_policy/get_password_policy.d.ts +48 -0
  39. package/dist/browser-cjs/src/api/project_config/get_project_config.d.ts +25 -0
  40. package/dist/browser-cjs/src/core/action_code_url.d.ts +73 -0
  41. package/dist/browser-cjs/src/core/auth/auth_event_manager.d.ts +34 -0
  42. package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +133 -0
  43. package/dist/browser-cjs/src/core/auth/emulator.d.ts +42 -0
  44. package/dist/browser-cjs/src/core/auth/firebase_internal.d.ts +35 -0
  45. package/dist/browser-cjs/src/core/auth/initialize.d.ts +46 -0
  46. package/dist/browser-cjs/src/core/auth/middleware.d.ts +25 -0
  47. package/dist/browser-cjs/src/core/auth/password_policy_impl.d.ts +59 -0
  48. package/dist/browser-cjs/src/core/auth/register.d.ts +23 -0
  49. package/dist/browser-cjs/src/core/credentials/auth_credential.d.ts +75 -0
  50. package/dist/browser-cjs/src/core/credentials/email.d.ts +60 -0
  51. package/dist/browser-cjs/src/core/credentials/index.d.ts +23 -0
  52. package/dist/browser-cjs/src/core/credentials/oauth.d.ts +81 -0
  53. package/dist/browser-cjs/src/core/credentials/phone.d.ts +52 -0
  54. package/dist/browser-cjs/src/core/credentials/saml.d.ts +52 -0
  55. package/dist/browser-cjs/src/core/errors.d.ts +328 -0
  56. package/dist/browser-cjs/src/core/index.d.ts +230 -0
  57. package/dist/browser-cjs/src/core/persistence/in_memory.d.ts +35 -0
  58. package/dist/browser-cjs/src/core/persistence/index.d.ts +42 -0
  59. package/dist/browser-cjs/src/core/persistence/persistence_user_manager.d.ts +45 -0
  60. package/dist/browser-cjs/src/core/providers/email.d.ts +83 -0
  61. package/dist/browser-cjs/src/core/providers/facebook.d.ts +93 -0
  62. package/dist/browser-cjs/src/core/providers/federated.d.ts +64 -0
  63. package/dist/browser-cjs/src/core/providers/github.d.ts +89 -0
  64. package/dist/browser-cjs/src/core/providers/google.d.ts +96 -0
  65. package/dist/browser-cjs/src/core/providers/oauth.d.ts +151 -0
  66. package/dist/browser-cjs/src/core/providers/saml.d.ts +62 -0
  67. package/dist/browser-cjs/src/core/providers/twitter.d.ts +103 -0
  68. package/dist/browser-cjs/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  69. package/dist/browser-cjs/src/core/strategies/action_code_settings.d.ts +19 -0
  70. package/dist/browser-cjs/src/core/strategies/anonymous.d.ts +32 -0
  71. package/dist/browser-cjs/src/core/strategies/credential.d.ts +64 -0
  72. package/dist/browser-cjs/src/core/strategies/custom_token.d.ts +37 -0
  73. package/dist/browser-cjs/src/core/strategies/email.d.ts +104 -0
  74. package/dist/browser-cjs/src/core/strategies/email_and_password.d.ts +139 -0
  75. package/dist/browser-cjs/src/core/strategies/email_link.d.ts +107 -0
  76. package/dist/browser-cjs/src/core/strategies/idp.d.ts +32 -0
  77. package/dist/browser-cjs/src/core/strategies/redirect.d.ts +36 -0
  78. package/dist/browser-cjs/src/core/user/account_info.d.ts +68 -0
  79. package/dist/browser-cjs/src/core/user/additional_user_info.d.ts +31 -0
  80. package/dist/browser-cjs/src/core/user/id_token_result.d.ts +48 -0
  81. package/dist/browser-cjs/src/core/user/invalidation.d.ts +18 -0
  82. package/dist/browser-cjs/src/core/user/link_unlink.d.ts +30 -0
  83. package/dist/browser-cjs/src/core/user/proactive_refresh.d.ts +34 -0
  84. package/dist/browser-cjs/src/core/user/reauthenticate.d.ts +20 -0
  85. package/dist/browser-cjs/src/core/user/reload.d.ts +29 -0
  86. package/dist/browser-cjs/src/core/user/token_manager.d.ts +50 -0
  87. package/dist/browser-cjs/src/core/user/user_credential_impl.d.ts +37 -0
  88. package/dist/browser-cjs/src/core/user/user_impl.d.ts +74 -0
  89. package/dist/browser-cjs/src/core/user/user_metadata.d.ts +27 -0
  90. package/dist/browser-cjs/src/core/util/assert.d.ts +94 -0
  91. package/dist/browser-cjs/src/core/util/browser.d.ts +50 -0
  92. package/dist/browser-cjs/src/core/util/delay.d.ts +31 -0
  93. package/dist/browser-cjs/src/core/util/emulator.d.ts +18 -0
  94. package/dist/browser-cjs/src/core/util/event_id.d.ts +17 -0
  95. package/dist/browser-cjs/src/core/util/fetch_provider.d.ts +25 -0
  96. package/dist/browser-cjs/src/core/util/handler.d.ts +20 -0
  97. package/dist/browser-cjs/src/core/util/instantiator.d.ts +28 -0
  98. package/dist/browser-cjs/src/core/util/location.d.ts +19 -0
  99. package/dist/browser-cjs/src/core/util/log.d.ts +23 -0
  100. package/dist/browser-cjs/src/core/util/navigator.d.ts +21 -0
  101. package/dist/browser-cjs/src/core/util/providers.d.ts +23 -0
  102. package/dist/browser-cjs/src/core/util/resolver.d.ts +25 -0
  103. package/dist/browser-cjs/src/core/util/time.d.ts +17 -0
  104. package/dist/browser-cjs/src/core/util/validate_origin.d.ts +18 -0
  105. package/dist/browser-cjs/src/core/util/version.d.ts +31 -0
  106. package/dist/browser-cjs/src/index.d.ts +18 -0
  107. package/dist/browser-cjs/src/mfa/assertions/totp.d.ts +124 -0
  108. package/dist/browser-cjs/src/mfa/index.d.ts +18 -0
  109. package/dist/browser-cjs/src/mfa/mfa_assertion.d.ts +27 -0
  110. package/dist/browser-cjs/src/mfa/mfa_error.d.ts +35 -0
  111. package/dist/browser-cjs/src/mfa/mfa_info.d.ts +36 -0
  112. package/dist/browser-cjs/src/mfa/mfa_resolver.d.ts +41 -0
  113. package/dist/browser-cjs/src/mfa/mfa_session.d.ts +39 -0
  114. package/dist/browser-cjs/src/mfa/mfa_user.d.ts +38 -0
  115. package/dist/browser-cjs/src/model/application_verifier.d.ts +23 -0
  116. package/dist/browser-cjs/src/model/auth.d.ts +90 -0
  117. package/dist/browser-cjs/src/model/enum_maps.d.ts +98 -0
  118. package/dist/browser-cjs/src/model/enums.d.ts +74 -0
  119. package/dist/browser-cjs/src/model/id_token.d.ts +87 -0
  120. package/dist/browser-cjs/src/model/password_policy.d.ts +111 -0
  121. package/dist/browser-cjs/src/model/popup_redirect.d.ts +94 -0
  122. package/dist/browser-cjs/src/model/public_types.d.ts +1291 -0
  123. package/dist/browser-cjs/src/model/user.d.ts +83 -0
  124. package/dist/browser-cjs/src/platform_browser/auth_window.d.ts +37 -0
  125. package/dist/browser-cjs/src/platform_browser/iframe/gapi.d.ts +19 -0
  126. package/dist/browser-cjs/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  127. package/dist/browser-cjs/src/platform_browser/iframe/iframe.d.ts +18 -0
  128. package/dist/browser-cjs/src/platform_browser/index.d.ts +27 -0
  129. package/dist/browser-cjs/src/platform_browser/load_js.d.ts +29 -0
  130. package/dist/browser-cjs/src/platform_browser/messagechannel/index.d.ts +87 -0
  131. package/dist/browser-cjs/src/platform_browser/messagechannel/promise.d.ts +33 -0
  132. package/dist/browser-cjs/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  133. package/dist/browser-cjs/src/platform_browser/messagechannel/sender.d.ts +46 -0
  134. package/dist/browser-cjs/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  135. package/dist/browser-cjs/src/platform_browser/persistence/browser.d.ts +27 -0
  136. package/dist/browser-cjs/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  137. package/dist/browser-cjs/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  138. package/dist/browser-cjs/src/platform_browser/persistence/local_storage.d.ts +25 -0
  139. package/dist/browser-cjs/src/platform_browser/persistence/session_storage.d.ts +24 -0
  140. package/dist/browser-cjs/src/platform_browser/popup_redirect.d.ts +27 -0
  141. package/dist/browser-cjs/src/platform_browser/providers/phone.d.ts +154 -0
  142. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  143. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  144. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  145. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  146. package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  147. package/dist/browser-cjs/src/platform_browser/strategies/phone.d.ts +116 -0
  148. package/dist/browser-cjs/src/platform_browser/strategies/popup.d.ts +109 -0
  149. package/dist/browser-cjs/src/platform_browser/strategies/redirect.d.ts +176 -0
  150. package/dist/browser-cjs/src/platform_browser/util/popup.d.ts +24 -0
  151. package/dist/browser-cjs/src/platform_browser/util/worker.d.ts +20 -0
  152. package/dist/browser-cjs/src/platform_cordova/plugins.d.ts +42 -0
  153. package/dist/browser-cjs/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  154. package/dist/browser-cjs/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  155. package/dist/browser-cjs/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  156. package/dist/browser-cjs/src/platform_cordova/strategies/redirect.d.ts +20 -0
  157. package/dist/browser-cjs/src/platform_node/index.d.ts +51 -0
  158. package/dist/browser-cjs/src/platform_react_native/persistence/react_native.d.ts +25 -0
  159. package/dist/browser-cjs/test/helpers/api/helper.d.ts +22 -0
  160. package/dist/browser-cjs/test/helpers/delay.d.ts +20 -0
  161. package/dist/browser-cjs/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  162. package/dist/browser-cjs/test/helpers/fake_service_worker.d.ts +22 -0
  163. package/dist/browser-cjs/test/helpers/id_token_response.d.ts +18 -0
  164. package/dist/browser-cjs/test/helpers/iframe_event.d.ts +19 -0
  165. package/dist/browser-cjs/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  166. package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +32 -0
  167. package/dist/browser-cjs/test/helpers/integration/settings.d.ts +23 -0
  168. package/dist/browser-cjs/test/helpers/jwt.d.ts +17 -0
  169. package/dist/browser-cjs/test/helpers/mock_auth.d.ts +47 -0
  170. package/dist/browser-cjs/test/helpers/mock_auth_credential.d.ts +31 -0
  171. package/dist/browser-cjs/test/helpers/mock_fetch.d.ts +31 -0
  172. package/dist/browser-cjs/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  173. package/dist/browser-cjs/test/helpers/redirect_persistence.d.ts +24 -0
  174. package/dist/browser-cjs/test/helpers/timeout_stub.d.ts +34 -0
  175. package/dist/browser-cjs/test/integration/flows/middleware_test_generator.d.ts +18 -0
  176. package/dist/browser-cjs/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  177. package/dist/browser-cjs/test/integration/webdriver/util/functions.d.ts +81 -0
  178. package/dist/browser-cjs/test/integration/webdriver/util/idp_page.d.ts +31 -0
  179. package/dist/browser-cjs/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  180. package/dist/browser-cjs/test/integration/webdriver/util/test_runner.d.ts +19 -0
  181. package/dist/browser-cjs/test/integration/webdriver/util/test_server.d.ts +27 -0
  182. package/dist/browser-cjs/test/integration/webdriver/util/ui_page.d.ts +33 -0
  183. package/dist/cordova/auth-cordova-public.d.ts +3397 -0
  184. package/dist/cordova/auth-cordova.d.ts +3948 -0
  185. package/dist/cordova/index.cordova.d.ts +32 -0
  186. package/dist/cordova/index.d.ts +38 -0
  187. package/dist/cordova/index.doc.d.ts +24 -0
  188. package/dist/cordova/index.js +63 -0
  189. package/dist/cordova/index.js.map +1 -0
  190. package/dist/cordova/index.node.d.ts +17 -0
  191. package/dist/cordova/index.rn.d.ts +40 -0
  192. package/dist/cordova/index.shared.d.ts +19 -0
  193. package/dist/cordova/index.web-extension.d.ts +31 -0
  194. package/dist/cordova/index.webworker.d.ts +21 -0
  195. package/dist/cordova/internal/index.d.ts +42 -0
  196. package/dist/cordova/internal.js +1986 -0
  197. package/dist/cordova/internal.js.map +1 -0
  198. package/dist/cordova/popup_redirect-29c7321e.js +9735 -0
  199. package/dist/cordova/popup_redirect-29c7321e.js.map +1 -0
  200. package/dist/cordova/scripts/run_node_tests.d.ts +17 -0
  201. package/dist/cordova/src/api/account_management/account.d.ts +59 -0
  202. package/dist/cordova/src/api/account_management/email_and_password.d.ts +49 -0
  203. package/dist/cordova/src/api/account_management/mfa.d.ts +107 -0
  204. package/dist/cordova/src/api/account_management/profile.d.ts +29 -0
  205. package/dist/cordova/src/api/authentication/create_auth_uri.d.ts +26 -0
  206. package/dist/cordova/src/api/authentication/custom_token.d.ts +26 -0
  207. package/dist/cordova/src/api/authentication/email_and_password.d.ts +86 -0
  208. package/dist/cordova/src/api/authentication/email_link.d.ts +32 -0
  209. package/dist/cordova/src/api/authentication/idp.d.ts +40 -0
  210. package/dist/cordova/src/api/authentication/mfa.d.ts +73 -0
  211. package/dist/cordova/src/api/authentication/recaptcha.d.ts +34 -0
  212. package/dist/cordova/src/api/authentication/sign_up.d.ts +34 -0
  213. package/dist/cordova/src/api/authentication/sms.d.ts +54 -0
  214. package/dist/cordova/src/api/authentication/token.d.ts +37 -0
  215. package/dist/cordova/src/api/errors.d.ts +129 -0
  216. package/dist/cordova/src/api/index.d.ts +101 -0
  217. package/dist/cordova/src/api/password_policy/get_password_policy.d.ts +48 -0
  218. package/dist/cordova/src/api/project_config/get_project_config.d.ts +25 -0
  219. package/dist/cordova/src/core/action_code_url.d.ts +73 -0
  220. package/dist/cordova/src/core/auth/auth_event_manager.d.ts +34 -0
  221. package/dist/cordova/src/core/auth/auth_impl.d.ts +133 -0
  222. package/dist/cordova/src/core/auth/emulator.d.ts +42 -0
  223. package/dist/cordova/src/core/auth/firebase_internal.d.ts +35 -0
  224. package/dist/cordova/src/core/auth/initialize.d.ts +46 -0
  225. package/dist/cordova/src/core/auth/middleware.d.ts +25 -0
  226. package/dist/cordova/src/core/auth/password_policy_impl.d.ts +59 -0
  227. package/dist/cordova/src/core/auth/register.d.ts +23 -0
  228. package/dist/cordova/src/core/credentials/auth_credential.d.ts +75 -0
  229. package/dist/cordova/src/core/credentials/email.d.ts +60 -0
  230. package/dist/cordova/src/core/credentials/index.d.ts +23 -0
  231. package/dist/cordova/src/core/credentials/oauth.d.ts +81 -0
  232. package/dist/cordova/src/core/credentials/phone.d.ts +52 -0
  233. package/dist/cordova/src/core/credentials/saml.d.ts +52 -0
  234. package/dist/cordova/src/core/errors.d.ts +328 -0
  235. package/dist/cordova/src/core/index.d.ts +230 -0
  236. package/dist/cordova/src/core/persistence/in_memory.d.ts +35 -0
  237. package/dist/cordova/src/core/persistence/index.d.ts +42 -0
  238. package/dist/cordova/src/core/persistence/persistence_user_manager.d.ts +45 -0
  239. package/dist/cordova/src/core/providers/email.d.ts +83 -0
  240. package/dist/cordova/src/core/providers/facebook.d.ts +93 -0
  241. package/dist/cordova/src/core/providers/federated.d.ts +64 -0
  242. package/dist/cordova/src/core/providers/github.d.ts +89 -0
  243. package/dist/cordova/src/core/providers/google.d.ts +96 -0
  244. package/dist/cordova/src/core/providers/oauth.d.ts +151 -0
  245. package/dist/cordova/src/core/providers/saml.d.ts +62 -0
  246. package/dist/cordova/src/core/providers/twitter.d.ts +103 -0
  247. package/dist/cordova/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  248. package/dist/cordova/src/core/strategies/action_code_settings.d.ts +19 -0
  249. package/dist/cordova/src/core/strategies/anonymous.d.ts +32 -0
  250. package/dist/cordova/src/core/strategies/credential.d.ts +64 -0
  251. package/dist/cordova/src/core/strategies/custom_token.d.ts +37 -0
  252. package/dist/cordova/src/core/strategies/email.d.ts +104 -0
  253. package/dist/cordova/src/core/strategies/email_and_password.d.ts +139 -0
  254. package/dist/cordova/src/core/strategies/email_link.d.ts +107 -0
  255. package/dist/cordova/src/core/strategies/idp.d.ts +32 -0
  256. package/dist/cordova/src/core/strategies/redirect.d.ts +36 -0
  257. package/dist/cordova/src/core/user/account_info.d.ts +68 -0
  258. package/dist/cordova/src/core/user/additional_user_info.d.ts +31 -0
  259. package/dist/cordova/src/core/user/id_token_result.d.ts +48 -0
  260. package/dist/cordova/src/core/user/invalidation.d.ts +18 -0
  261. package/dist/cordova/src/core/user/link_unlink.d.ts +30 -0
  262. package/dist/cordova/src/core/user/proactive_refresh.d.ts +34 -0
  263. package/dist/cordova/src/core/user/reauthenticate.d.ts +20 -0
  264. package/dist/cordova/src/core/user/reload.d.ts +29 -0
  265. package/dist/cordova/src/core/user/token_manager.d.ts +50 -0
  266. package/dist/cordova/src/core/user/user_credential_impl.d.ts +37 -0
  267. package/dist/cordova/src/core/user/user_impl.d.ts +74 -0
  268. package/dist/cordova/src/core/user/user_metadata.d.ts +27 -0
  269. package/dist/cordova/src/core/util/assert.d.ts +94 -0
  270. package/dist/cordova/src/core/util/browser.d.ts +50 -0
  271. package/dist/cordova/src/core/util/delay.d.ts +31 -0
  272. package/dist/cordova/src/core/util/emulator.d.ts +18 -0
  273. package/dist/cordova/src/core/util/event_id.d.ts +17 -0
  274. package/dist/cordova/src/core/util/fetch_provider.d.ts +25 -0
  275. package/dist/cordova/src/core/util/handler.d.ts +20 -0
  276. package/dist/cordova/src/core/util/instantiator.d.ts +28 -0
  277. package/dist/cordova/src/core/util/location.d.ts +19 -0
  278. package/dist/cordova/src/core/util/log.d.ts +23 -0
  279. package/dist/cordova/src/core/util/navigator.d.ts +21 -0
  280. package/dist/cordova/src/core/util/providers.d.ts +23 -0
  281. package/dist/cordova/src/core/util/resolver.d.ts +25 -0
  282. package/dist/cordova/src/core/util/time.d.ts +17 -0
  283. package/dist/cordova/src/core/util/validate_origin.d.ts +18 -0
  284. package/dist/cordova/src/core/util/version.d.ts +31 -0
  285. package/dist/cordova/src/index.d.ts +18 -0
  286. package/dist/cordova/src/mfa/assertions/totp.d.ts +124 -0
  287. package/dist/cordova/src/mfa/index.d.ts +18 -0
  288. package/dist/cordova/src/mfa/mfa_assertion.d.ts +27 -0
  289. package/dist/cordova/src/mfa/mfa_error.d.ts +35 -0
  290. package/dist/cordova/src/mfa/mfa_info.d.ts +36 -0
  291. package/dist/cordova/src/mfa/mfa_resolver.d.ts +41 -0
  292. package/dist/cordova/src/mfa/mfa_session.d.ts +39 -0
  293. package/dist/cordova/src/mfa/mfa_user.d.ts +38 -0
  294. package/dist/cordova/src/model/application_verifier.d.ts +23 -0
  295. package/dist/cordova/src/model/auth.d.ts +90 -0
  296. package/dist/cordova/src/model/enum_maps.d.ts +98 -0
  297. package/dist/cordova/src/model/enums.d.ts +74 -0
  298. package/dist/cordova/src/model/id_token.d.ts +87 -0
  299. package/dist/cordova/src/model/password_policy.d.ts +111 -0
  300. package/dist/cordova/src/model/popup_redirect.d.ts +94 -0
  301. package/dist/cordova/src/model/public_types.d.ts +1291 -0
  302. package/dist/cordova/src/model/user.d.ts +83 -0
  303. package/dist/cordova/src/platform_browser/auth_window.d.ts +37 -0
  304. package/dist/cordova/src/platform_browser/iframe/gapi.d.ts +19 -0
  305. package/dist/cordova/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  306. package/dist/cordova/src/platform_browser/iframe/iframe.d.ts +18 -0
  307. package/dist/cordova/src/platform_browser/index.d.ts +27 -0
  308. package/dist/cordova/src/platform_browser/load_js.d.ts +29 -0
  309. package/dist/cordova/src/platform_browser/messagechannel/index.d.ts +87 -0
  310. package/dist/cordova/src/platform_browser/messagechannel/promise.d.ts +33 -0
  311. package/dist/cordova/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  312. package/dist/cordova/src/platform_browser/messagechannel/sender.d.ts +46 -0
  313. package/dist/cordova/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  314. package/dist/cordova/src/platform_browser/persistence/browser.d.ts +27 -0
  315. package/dist/cordova/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  316. package/dist/cordova/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  317. package/dist/cordova/src/platform_browser/persistence/local_storage.d.ts +25 -0
  318. package/dist/cordova/src/platform_browser/persistence/session_storage.d.ts +24 -0
  319. package/dist/cordova/src/platform_browser/popup_redirect.d.ts +27 -0
  320. package/dist/cordova/src/platform_browser/providers/phone.d.ts +154 -0
  321. package/dist/cordova/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  322. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  323. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  324. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  325. package/dist/cordova/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  326. package/dist/cordova/src/platform_browser/strategies/phone.d.ts +116 -0
  327. package/dist/cordova/src/platform_browser/strategies/popup.d.ts +109 -0
  328. package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +176 -0
  329. package/dist/cordova/src/platform_browser/util/popup.d.ts +24 -0
  330. package/dist/cordova/src/platform_browser/util/worker.d.ts +20 -0
  331. package/dist/cordova/src/platform_cordova/plugins.d.ts +42 -0
  332. package/dist/cordova/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  333. package/dist/cordova/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  334. package/dist/cordova/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  335. package/dist/cordova/src/platform_cordova/strategies/redirect.d.ts +20 -0
  336. package/dist/cordova/src/platform_node/index.d.ts +51 -0
  337. package/dist/cordova/src/platform_react_native/persistence/react_native.d.ts +25 -0
  338. package/dist/cordova/test/helpers/api/helper.d.ts +22 -0
  339. package/dist/cordova/test/helpers/delay.d.ts +20 -0
  340. package/dist/cordova/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  341. package/dist/cordova/test/helpers/fake_service_worker.d.ts +22 -0
  342. package/dist/cordova/test/helpers/id_token_response.d.ts +18 -0
  343. package/dist/cordova/test/helpers/iframe_event.d.ts +19 -0
  344. package/dist/cordova/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  345. package/dist/cordova/test/helpers/integration/helpers.d.ts +32 -0
  346. package/dist/cordova/test/helpers/integration/settings.d.ts +23 -0
  347. package/dist/cordova/test/helpers/jwt.d.ts +17 -0
  348. package/dist/cordova/test/helpers/mock_auth.d.ts +47 -0
  349. package/dist/cordova/test/helpers/mock_auth_credential.d.ts +31 -0
  350. package/dist/cordova/test/helpers/mock_fetch.d.ts +31 -0
  351. package/dist/cordova/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  352. package/dist/cordova/test/helpers/redirect_persistence.d.ts +24 -0
  353. package/dist/cordova/test/helpers/timeout_stub.d.ts +34 -0
  354. package/dist/cordova/test/integration/flows/middleware_test_generator.d.ts +18 -0
  355. package/dist/cordova/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  356. package/dist/cordova/test/integration/webdriver/util/functions.d.ts +81 -0
  357. package/dist/cordova/test/integration/webdriver/util/idp_page.d.ts +31 -0
  358. package/dist/cordova/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  359. package/dist/cordova/test/integration/webdriver/util/test_runner.d.ts +19 -0
  360. package/dist/cordova/test/integration/webdriver/util/test_server.d.ts +27 -0
  361. package/dist/cordova/test/integration/webdriver/util/ui_page.d.ts +33 -0
  362. package/dist/cordova/tsdoc-metadata.json +11 -0
  363. package/dist/esm/index-3398f4bb.js +11156 -0
  364. package/dist/esm/index-3398f4bb.js.map +1 -0
  365. package/dist/esm/index.cordova.d.ts +32 -0
  366. package/dist/esm/index.d.ts +38 -0
  367. package/dist/esm/index.doc.d.ts +24 -0
  368. package/dist/esm/index.js +6 -0
  369. package/dist/esm/index.js.map +1 -0
  370. package/dist/esm/index.node.d.ts +17 -0
  371. package/dist/esm/index.rn.d.ts +40 -0
  372. package/dist/esm/index.shared.d.ts +19 -0
  373. package/dist/esm/index.web-extension.d.ts +31 -0
  374. package/dist/esm/index.webworker.d.ts +21 -0
  375. package/dist/esm/internal/index.d.ts +42 -0
  376. package/dist/esm/internal.js +565 -0
  377. package/dist/esm/internal.js.map +1 -0
  378. package/dist/esm/scripts/run_node_tests.d.ts +17 -0
  379. package/dist/esm/src/api/account_management/account.d.ts +59 -0
  380. package/dist/esm/src/api/account_management/email_and_password.d.ts +49 -0
  381. package/dist/esm/src/api/account_management/mfa.d.ts +107 -0
  382. package/dist/esm/src/api/account_management/profile.d.ts +29 -0
  383. package/dist/esm/src/api/authentication/create_auth_uri.d.ts +26 -0
  384. package/dist/esm/src/api/authentication/custom_token.d.ts +26 -0
  385. package/dist/esm/src/api/authentication/email_and_password.d.ts +86 -0
  386. package/dist/esm/src/api/authentication/email_link.d.ts +32 -0
  387. package/dist/esm/src/api/authentication/idp.d.ts +40 -0
  388. package/dist/esm/src/api/authentication/mfa.d.ts +73 -0
  389. package/dist/esm/src/api/authentication/recaptcha.d.ts +34 -0
  390. package/dist/esm/src/api/authentication/sign_up.d.ts +34 -0
  391. package/dist/esm/src/api/authentication/sms.d.ts +54 -0
  392. package/dist/esm/src/api/authentication/token.d.ts +37 -0
  393. package/dist/esm/src/api/errors.d.ts +129 -0
  394. package/dist/esm/src/api/index.d.ts +101 -0
  395. package/dist/esm/src/api/password_policy/get_password_policy.d.ts +48 -0
  396. package/dist/esm/src/api/project_config/get_project_config.d.ts +25 -0
  397. package/dist/esm/src/core/action_code_url.d.ts +73 -0
  398. package/dist/esm/src/core/auth/auth_event_manager.d.ts +34 -0
  399. package/dist/esm/src/core/auth/auth_impl.d.ts +133 -0
  400. package/dist/esm/src/core/auth/emulator.d.ts +42 -0
  401. package/dist/esm/src/core/auth/firebase_internal.d.ts +35 -0
  402. package/dist/esm/src/core/auth/initialize.d.ts +46 -0
  403. package/dist/esm/src/core/auth/middleware.d.ts +25 -0
  404. package/dist/esm/src/core/auth/password_policy_impl.d.ts +59 -0
  405. package/dist/esm/src/core/auth/register.d.ts +23 -0
  406. package/dist/esm/src/core/credentials/auth_credential.d.ts +75 -0
  407. package/dist/esm/src/core/credentials/email.d.ts +60 -0
  408. package/dist/esm/src/core/credentials/index.d.ts +23 -0
  409. package/dist/esm/src/core/credentials/oauth.d.ts +81 -0
  410. package/dist/esm/src/core/credentials/phone.d.ts +52 -0
  411. package/dist/esm/src/core/credentials/saml.d.ts +52 -0
  412. package/dist/esm/src/core/errors.d.ts +328 -0
  413. package/dist/esm/src/core/index.d.ts +230 -0
  414. package/dist/esm/src/core/persistence/in_memory.d.ts +35 -0
  415. package/dist/esm/src/core/persistence/index.d.ts +42 -0
  416. package/dist/esm/src/core/persistence/persistence_user_manager.d.ts +45 -0
  417. package/dist/esm/src/core/providers/email.d.ts +83 -0
  418. package/dist/esm/src/core/providers/facebook.d.ts +93 -0
  419. package/dist/esm/src/core/providers/federated.d.ts +64 -0
  420. package/dist/esm/src/core/providers/github.d.ts +89 -0
  421. package/dist/esm/src/core/providers/google.d.ts +96 -0
  422. package/dist/esm/src/core/providers/oauth.d.ts +151 -0
  423. package/dist/esm/src/core/providers/saml.d.ts +62 -0
  424. package/dist/esm/src/core/providers/twitter.d.ts +103 -0
  425. package/dist/esm/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  426. package/dist/esm/src/core/strategies/action_code_settings.d.ts +19 -0
  427. package/dist/esm/src/core/strategies/anonymous.d.ts +32 -0
  428. package/dist/esm/src/core/strategies/credential.d.ts +64 -0
  429. package/dist/esm/src/core/strategies/custom_token.d.ts +37 -0
  430. package/dist/esm/src/core/strategies/email.d.ts +104 -0
  431. package/dist/esm/src/core/strategies/email_and_password.d.ts +139 -0
  432. package/dist/esm/src/core/strategies/email_link.d.ts +107 -0
  433. package/dist/esm/src/core/strategies/idp.d.ts +32 -0
  434. package/dist/esm/src/core/strategies/redirect.d.ts +36 -0
  435. package/dist/esm/src/core/user/account_info.d.ts +68 -0
  436. package/dist/esm/src/core/user/additional_user_info.d.ts +31 -0
  437. package/dist/esm/src/core/user/id_token_result.d.ts +48 -0
  438. package/dist/esm/src/core/user/invalidation.d.ts +18 -0
  439. package/dist/esm/src/core/user/link_unlink.d.ts +30 -0
  440. package/dist/esm/src/core/user/proactive_refresh.d.ts +34 -0
  441. package/dist/esm/src/core/user/reauthenticate.d.ts +20 -0
  442. package/dist/esm/src/core/user/reload.d.ts +29 -0
  443. package/dist/esm/src/core/user/token_manager.d.ts +50 -0
  444. package/dist/esm/src/core/user/user_credential_impl.d.ts +37 -0
  445. package/dist/esm/src/core/user/user_impl.d.ts +74 -0
  446. package/dist/esm/src/core/user/user_metadata.d.ts +27 -0
  447. package/dist/esm/src/core/util/assert.d.ts +94 -0
  448. package/dist/esm/src/core/util/browser.d.ts +50 -0
  449. package/dist/esm/src/core/util/delay.d.ts +31 -0
  450. package/dist/esm/src/core/util/emulator.d.ts +18 -0
  451. package/dist/esm/src/core/util/event_id.d.ts +17 -0
  452. package/dist/esm/src/core/util/fetch_provider.d.ts +25 -0
  453. package/dist/esm/src/core/util/handler.d.ts +20 -0
  454. package/dist/esm/src/core/util/instantiator.d.ts +28 -0
  455. package/dist/esm/src/core/util/location.d.ts +19 -0
  456. package/dist/esm/src/core/util/log.d.ts +23 -0
  457. package/dist/esm/src/core/util/navigator.d.ts +21 -0
  458. package/dist/esm/src/core/util/providers.d.ts +23 -0
  459. package/dist/esm/src/core/util/resolver.d.ts +25 -0
  460. package/dist/esm/src/core/util/time.d.ts +17 -0
  461. package/dist/esm/src/core/util/validate_origin.d.ts +18 -0
  462. package/dist/esm/src/core/util/version.d.ts +31 -0
  463. package/dist/esm/src/index.d.ts +18 -0
  464. package/dist/esm/src/mfa/assertions/totp.d.ts +124 -0
  465. package/dist/esm/src/mfa/index.d.ts +18 -0
  466. package/dist/esm/src/mfa/mfa_assertion.d.ts +27 -0
  467. package/dist/esm/src/mfa/mfa_error.d.ts +35 -0
  468. package/dist/esm/src/mfa/mfa_info.d.ts +36 -0
  469. package/dist/esm/src/mfa/mfa_resolver.d.ts +41 -0
  470. package/dist/esm/src/mfa/mfa_session.d.ts +39 -0
  471. package/dist/esm/src/mfa/mfa_user.d.ts +38 -0
  472. package/dist/esm/src/model/application_verifier.d.ts +23 -0
  473. package/dist/esm/src/model/auth.d.ts +90 -0
  474. package/dist/esm/src/model/enum_maps.d.ts +98 -0
  475. package/dist/esm/src/model/enums.d.ts +74 -0
  476. package/dist/esm/src/model/id_token.d.ts +87 -0
  477. package/dist/esm/src/model/password_policy.d.ts +111 -0
  478. package/dist/esm/src/model/popup_redirect.d.ts +94 -0
  479. package/dist/esm/src/model/public_types.d.ts +1291 -0
  480. package/dist/esm/src/model/user.d.ts +83 -0
  481. package/dist/esm/src/platform_browser/auth_window.d.ts +37 -0
  482. package/dist/esm/src/platform_browser/iframe/gapi.d.ts +19 -0
  483. package/dist/esm/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  484. package/dist/esm/src/platform_browser/iframe/iframe.d.ts +18 -0
  485. package/dist/esm/src/platform_browser/index.d.ts +27 -0
  486. package/dist/esm/src/platform_browser/load_js.d.ts +29 -0
  487. package/dist/esm/src/platform_browser/messagechannel/index.d.ts +87 -0
  488. package/dist/esm/src/platform_browser/messagechannel/promise.d.ts +33 -0
  489. package/dist/esm/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  490. package/dist/esm/src/platform_browser/messagechannel/sender.d.ts +46 -0
  491. package/dist/esm/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  492. package/dist/esm/src/platform_browser/persistence/browser.d.ts +27 -0
  493. package/dist/esm/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  494. package/dist/esm/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  495. package/dist/esm/src/platform_browser/persistence/local_storage.d.ts +25 -0
  496. package/dist/esm/src/platform_browser/persistence/session_storage.d.ts +24 -0
  497. package/dist/esm/src/platform_browser/popup_redirect.d.ts +27 -0
  498. package/dist/esm/src/platform_browser/providers/phone.d.ts +154 -0
  499. package/dist/esm/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  500. package/dist/esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  501. package/dist/esm/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  502. package/dist/esm/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  503. package/dist/esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  504. package/dist/esm/src/platform_browser/strategies/phone.d.ts +116 -0
  505. package/dist/esm/src/platform_browser/strategies/popup.d.ts +109 -0
  506. package/dist/esm/src/platform_browser/strategies/redirect.d.ts +176 -0
  507. package/dist/esm/src/platform_browser/util/popup.d.ts +24 -0
  508. package/dist/esm/src/platform_browser/util/worker.d.ts +20 -0
  509. package/dist/esm/src/platform_cordova/plugins.d.ts +42 -0
  510. package/dist/esm/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  511. package/dist/esm/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  512. package/dist/esm/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  513. package/dist/esm/src/platform_cordova/strategies/redirect.d.ts +20 -0
  514. package/dist/esm/src/platform_node/index.d.ts +51 -0
  515. package/dist/esm/src/platform_react_native/persistence/react_native.d.ts +25 -0
  516. package/dist/esm/test/helpers/api/helper.d.ts +22 -0
  517. package/dist/esm/test/helpers/delay.d.ts +20 -0
  518. package/dist/esm/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  519. package/dist/esm/test/helpers/fake_service_worker.d.ts +22 -0
  520. package/dist/esm/test/helpers/id_token_response.d.ts +18 -0
  521. package/dist/esm/test/helpers/iframe_event.d.ts +19 -0
  522. package/dist/esm/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  523. package/dist/esm/test/helpers/integration/helpers.d.ts +32 -0
  524. package/dist/esm/test/helpers/integration/settings.d.ts +23 -0
  525. package/dist/esm/test/helpers/jwt.d.ts +17 -0
  526. package/dist/esm/test/helpers/mock_auth.d.ts +47 -0
  527. package/dist/esm/test/helpers/mock_auth_credential.d.ts +31 -0
  528. package/dist/esm/test/helpers/mock_fetch.d.ts +31 -0
  529. package/dist/esm/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  530. package/dist/esm/test/helpers/redirect_persistence.d.ts +24 -0
  531. package/dist/esm/test/helpers/timeout_stub.d.ts +34 -0
  532. package/dist/esm/test/integration/flows/middleware_test_generator.d.ts +18 -0
  533. package/dist/esm/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  534. package/dist/esm/test/integration/webdriver/util/functions.d.ts +81 -0
  535. package/dist/esm/test/integration/webdriver/util/idp_page.d.ts +31 -0
  536. package/dist/esm/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  537. package/dist/esm/test/integration/webdriver/util/test_runner.d.ts +19 -0
  538. package/dist/esm/test/integration/webdriver/util/test_server.d.ts +27 -0
  539. package/dist/esm/test/integration/webdriver/util/ui_page.d.ts +33 -0
  540. package/dist/index.cordova.d.ts +32 -0
  541. package/dist/index.d.ts +38 -0
  542. package/dist/index.doc.d.ts +24 -0
  543. package/dist/index.node.d.ts +17 -0
  544. package/dist/index.rn.d.ts +40 -0
  545. package/dist/index.shared.d.ts +19 -0
  546. package/dist/index.web-extension.d.ts +31 -0
  547. package/dist/index.webworker.d.ts +21 -0
  548. package/dist/index.webworker.js +8021 -0
  549. package/dist/index.webworker.js.map +1 -0
  550. package/dist/internal/index.d.ts +42 -0
  551. package/dist/node/index.cordova.d.ts +32 -0
  552. package/dist/node/index.d.ts +38 -0
  553. package/dist/node/index.doc.d.ts +24 -0
  554. package/dist/node/index.js +98 -0
  555. package/dist/node/index.js.map +1 -0
  556. package/dist/node/index.node.d.ts +17 -0
  557. package/dist/node/index.rn.d.ts +40 -0
  558. package/dist/node/index.shared.d.ts +19 -0
  559. package/dist/node/index.web-extension.d.ts +31 -0
  560. package/dist/node/index.webworker.d.ts +21 -0
  561. package/dist/node/internal/index.d.ts +42 -0
  562. package/dist/node/internal.js +1543 -0
  563. package/dist/node/internal.js.map +1 -0
  564. package/dist/node/scripts/run_node_tests.d.ts +17 -0
  565. package/dist/node/src/api/account_management/account.d.ts +59 -0
  566. package/dist/node/src/api/account_management/email_and_password.d.ts +49 -0
  567. package/dist/node/src/api/account_management/mfa.d.ts +107 -0
  568. package/dist/node/src/api/account_management/profile.d.ts +29 -0
  569. package/dist/node/src/api/authentication/create_auth_uri.d.ts +26 -0
  570. package/dist/node/src/api/authentication/custom_token.d.ts +26 -0
  571. package/dist/node/src/api/authentication/email_and_password.d.ts +86 -0
  572. package/dist/node/src/api/authentication/email_link.d.ts +32 -0
  573. package/dist/node/src/api/authentication/idp.d.ts +40 -0
  574. package/dist/node/src/api/authentication/mfa.d.ts +73 -0
  575. package/dist/node/src/api/authentication/recaptcha.d.ts +34 -0
  576. package/dist/node/src/api/authentication/sign_up.d.ts +34 -0
  577. package/dist/node/src/api/authentication/sms.d.ts +54 -0
  578. package/dist/node/src/api/authentication/token.d.ts +37 -0
  579. package/dist/node/src/api/errors.d.ts +129 -0
  580. package/dist/node/src/api/index.d.ts +101 -0
  581. package/dist/node/src/api/password_policy/get_password_policy.d.ts +48 -0
  582. package/dist/node/src/api/project_config/get_project_config.d.ts +25 -0
  583. package/dist/node/src/core/action_code_url.d.ts +73 -0
  584. package/dist/node/src/core/auth/auth_event_manager.d.ts +34 -0
  585. package/dist/node/src/core/auth/auth_impl.d.ts +133 -0
  586. package/dist/node/src/core/auth/emulator.d.ts +42 -0
  587. package/dist/node/src/core/auth/firebase_internal.d.ts +35 -0
  588. package/dist/node/src/core/auth/initialize.d.ts +46 -0
  589. package/dist/node/src/core/auth/middleware.d.ts +25 -0
  590. package/dist/node/src/core/auth/password_policy_impl.d.ts +59 -0
  591. package/dist/node/src/core/auth/register.d.ts +23 -0
  592. package/dist/node/src/core/credentials/auth_credential.d.ts +75 -0
  593. package/dist/node/src/core/credentials/email.d.ts +60 -0
  594. package/dist/node/src/core/credentials/index.d.ts +23 -0
  595. package/dist/node/src/core/credentials/oauth.d.ts +81 -0
  596. package/dist/node/src/core/credentials/phone.d.ts +52 -0
  597. package/dist/node/src/core/credentials/saml.d.ts +52 -0
  598. package/dist/node/src/core/errors.d.ts +328 -0
  599. package/dist/node/src/core/index.d.ts +230 -0
  600. package/dist/node/src/core/persistence/in_memory.d.ts +35 -0
  601. package/dist/node/src/core/persistence/index.d.ts +42 -0
  602. package/dist/node/src/core/persistence/persistence_user_manager.d.ts +45 -0
  603. package/dist/node/src/core/providers/email.d.ts +83 -0
  604. package/dist/node/src/core/providers/facebook.d.ts +93 -0
  605. package/dist/node/src/core/providers/federated.d.ts +64 -0
  606. package/dist/node/src/core/providers/github.d.ts +89 -0
  607. package/dist/node/src/core/providers/google.d.ts +96 -0
  608. package/dist/node/src/core/providers/oauth.d.ts +151 -0
  609. package/dist/node/src/core/providers/saml.d.ts +62 -0
  610. package/dist/node/src/core/providers/twitter.d.ts +103 -0
  611. package/dist/node/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  612. package/dist/node/src/core/strategies/action_code_settings.d.ts +19 -0
  613. package/dist/node/src/core/strategies/anonymous.d.ts +32 -0
  614. package/dist/node/src/core/strategies/credential.d.ts +64 -0
  615. package/dist/node/src/core/strategies/custom_token.d.ts +37 -0
  616. package/dist/node/src/core/strategies/email.d.ts +104 -0
  617. package/dist/node/src/core/strategies/email_and_password.d.ts +139 -0
  618. package/dist/node/src/core/strategies/email_link.d.ts +107 -0
  619. package/dist/node/src/core/strategies/idp.d.ts +32 -0
  620. package/dist/node/src/core/strategies/redirect.d.ts +36 -0
  621. package/dist/node/src/core/user/account_info.d.ts +68 -0
  622. package/dist/node/src/core/user/additional_user_info.d.ts +31 -0
  623. package/dist/node/src/core/user/id_token_result.d.ts +48 -0
  624. package/dist/node/src/core/user/invalidation.d.ts +18 -0
  625. package/dist/node/src/core/user/link_unlink.d.ts +30 -0
  626. package/dist/node/src/core/user/proactive_refresh.d.ts +34 -0
  627. package/dist/node/src/core/user/reauthenticate.d.ts +20 -0
  628. package/dist/node/src/core/user/reload.d.ts +29 -0
  629. package/dist/node/src/core/user/token_manager.d.ts +50 -0
  630. package/dist/node/src/core/user/user_credential_impl.d.ts +37 -0
  631. package/dist/node/src/core/user/user_impl.d.ts +74 -0
  632. package/dist/node/src/core/user/user_metadata.d.ts +27 -0
  633. package/dist/node/src/core/util/assert.d.ts +94 -0
  634. package/dist/node/src/core/util/browser.d.ts +50 -0
  635. package/dist/node/src/core/util/delay.d.ts +31 -0
  636. package/dist/node/src/core/util/emulator.d.ts +18 -0
  637. package/dist/node/src/core/util/event_id.d.ts +17 -0
  638. package/dist/node/src/core/util/fetch_provider.d.ts +25 -0
  639. package/dist/node/src/core/util/handler.d.ts +20 -0
  640. package/dist/node/src/core/util/instantiator.d.ts +28 -0
  641. package/dist/node/src/core/util/location.d.ts +19 -0
  642. package/dist/node/src/core/util/log.d.ts +23 -0
  643. package/dist/node/src/core/util/navigator.d.ts +21 -0
  644. package/dist/node/src/core/util/providers.d.ts +23 -0
  645. package/dist/node/src/core/util/resolver.d.ts +25 -0
  646. package/dist/node/src/core/util/time.d.ts +17 -0
  647. package/dist/node/src/core/util/validate_origin.d.ts +18 -0
  648. package/dist/node/src/core/util/version.d.ts +31 -0
  649. package/dist/node/src/index.d.ts +18 -0
  650. package/dist/node/src/mfa/assertions/totp.d.ts +124 -0
  651. package/dist/node/src/mfa/index.d.ts +18 -0
  652. package/dist/node/src/mfa/mfa_assertion.d.ts +27 -0
  653. package/dist/node/src/mfa/mfa_error.d.ts +35 -0
  654. package/dist/node/src/mfa/mfa_info.d.ts +36 -0
  655. package/dist/node/src/mfa/mfa_resolver.d.ts +41 -0
  656. package/dist/node/src/mfa/mfa_session.d.ts +39 -0
  657. package/dist/node/src/mfa/mfa_user.d.ts +38 -0
  658. package/dist/node/src/model/application_verifier.d.ts +23 -0
  659. package/dist/node/src/model/auth.d.ts +90 -0
  660. package/dist/node/src/model/enum_maps.d.ts +98 -0
  661. package/dist/node/src/model/enums.d.ts +74 -0
  662. package/dist/node/src/model/id_token.d.ts +87 -0
  663. package/dist/node/src/model/password_policy.d.ts +111 -0
  664. package/dist/node/src/model/popup_redirect.d.ts +94 -0
  665. package/dist/node/src/model/public_types.d.ts +1291 -0
  666. package/dist/node/src/model/user.d.ts +83 -0
  667. package/dist/node/src/platform_browser/auth_window.d.ts +37 -0
  668. package/dist/node/src/platform_browser/iframe/gapi.d.ts +19 -0
  669. package/dist/node/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  670. package/dist/node/src/platform_browser/iframe/iframe.d.ts +18 -0
  671. package/dist/node/src/platform_browser/index.d.ts +27 -0
  672. package/dist/node/src/platform_browser/load_js.d.ts +29 -0
  673. package/dist/node/src/platform_browser/messagechannel/index.d.ts +87 -0
  674. package/dist/node/src/platform_browser/messagechannel/promise.d.ts +33 -0
  675. package/dist/node/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  676. package/dist/node/src/platform_browser/messagechannel/sender.d.ts +46 -0
  677. package/dist/node/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  678. package/dist/node/src/platform_browser/persistence/browser.d.ts +27 -0
  679. package/dist/node/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  680. package/dist/node/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  681. package/dist/node/src/platform_browser/persistence/local_storage.d.ts +25 -0
  682. package/dist/node/src/platform_browser/persistence/session_storage.d.ts +24 -0
  683. package/dist/node/src/platform_browser/popup_redirect.d.ts +27 -0
  684. package/dist/node/src/platform_browser/providers/phone.d.ts +154 -0
  685. package/dist/node/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  686. package/dist/node/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  687. package/dist/node/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  688. package/dist/node/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  689. package/dist/node/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  690. package/dist/node/src/platform_browser/strategies/phone.d.ts +116 -0
  691. package/dist/node/src/platform_browser/strategies/popup.d.ts +109 -0
  692. package/dist/node/src/platform_browser/strategies/redirect.d.ts +176 -0
  693. package/dist/node/src/platform_browser/util/popup.d.ts +24 -0
  694. package/dist/node/src/platform_browser/util/worker.d.ts +20 -0
  695. package/dist/node/src/platform_cordova/plugins.d.ts +42 -0
  696. package/dist/node/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  697. package/dist/node/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  698. package/dist/node/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  699. package/dist/node/src/platform_cordova/strategies/redirect.d.ts +20 -0
  700. package/dist/node/src/platform_node/index.d.ts +51 -0
  701. package/dist/node/src/platform_react_native/persistence/react_native.d.ts +25 -0
  702. package/dist/node/test/helpers/api/helper.d.ts +22 -0
  703. package/dist/node/test/helpers/delay.d.ts +20 -0
  704. package/dist/node/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  705. package/dist/node/test/helpers/fake_service_worker.d.ts +22 -0
  706. package/dist/node/test/helpers/id_token_response.d.ts +18 -0
  707. package/dist/node/test/helpers/iframe_event.d.ts +19 -0
  708. package/dist/node/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  709. package/dist/node/test/helpers/integration/helpers.d.ts +32 -0
  710. package/dist/node/test/helpers/integration/settings.d.ts +23 -0
  711. package/dist/node/test/helpers/jwt.d.ts +17 -0
  712. package/dist/node/test/helpers/mock_auth.d.ts +47 -0
  713. package/dist/node/test/helpers/mock_auth_credential.d.ts +31 -0
  714. package/dist/node/test/helpers/mock_fetch.d.ts +31 -0
  715. package/dist/node/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  716. package/dist/node/test/helpers/redirect_persistence.d.ts +24 -0
  717. package/dist/node/test/helpers/timeout_stub.d.ts +34 -0
  718. package/dist/node/test/integration/flows/middleware_test_generator.d.ts +18 -0
  719. package/dist/node/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  720. package/dist/node/test/integration/webdriver/util/functions.d.ts +81 -0
  721. package/dist/node/test/integration/webdriver/util/idp_page.d.ts +31 -0
  722. package/dist/node/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  723. package/dist/node/test/integration/webdriver/util/test_runner.d.ts +19 -0
  724. package/dist/node/test/integration/webdriver/util/test_server.d.ts +27 -0
  725. package/dist/node/test/integration/webdriver/util/ui_page.d.ts +33 -0
  726. package/dist/node/totp-e822713d.js +7693 -0
  727. package/dist/node/totp-e822713d.js.map +1 -0
  728. package/dist/node-esm/index.cordova.d.ts +32 -0
  729. package/dist/node-esm/index.d.ts +38 -0
  730. package/dist/node-esm/index.doc.d.ts +24 -0
  731. package/dist/node-esm/index.js +6 -0
  732. package/dist/node-esm/index.js.map +1 -0
  733. package/dist/node-esm/index.node.d.ts +17 -0
  734. package/dist/node-esm/index.rn.d.ts +40 -0
  735. package/dist/node-esm/index.shared.d.ts +19 -0
  736. package/dist/node-esm/index.web-extension.d.ts +31 -0
  737. package/dist/node-esm/index.webworker.d.ts +21 -0
  738. package/dist/node-esm/internal/index.d.ts +42 -0
  739. package/dist/node-esm/internal.js +1440 -0
  740. package/dist/node-esm/internal.js.map +1 -0
  741. package/dist/node-esm/package.json +1 -0
  742. package/dist/node-esm/scripts/run_node_tests.d.ts +17 -0
  743. package/dist/node-esm/src/api/account_management/account.d.ts +59 -0
  744. package/dist/node-esm/src/api/account_management/email_and_password.d.ts +49 -0
  745. package/dist/node-esm/src/api/account_management/mfa.d.ts +107 -0
  746. package/dist/node-esm/src/api/account_management/profile.d.ts +29 -0
  747. package/dist/node-esm/src/api/authentication/create_auth_uri.d.ts +26 -0
  748. package/dist/node-esm/src/api/authentication/custom_token.d.ts +26 -0
  749. package/dist/node-esm/src/api/authentication/email_and_password.d.ts +86 -0
  750. package/dist/node-esm/src/api/authentication/email_link.d.ts +32 -0
  751. package/dist/node-esm/src/api/authentication/idp.d.ts +40 -0
  752. package/dist/node-esm/src/api/authentication/mfa.d.ts +73 -0
  753. package/dist/node-esm/src/api/authentication/recaptcha.d.ts +34 -0
  754. package/dist/node-esm/src/api/authentication/sign_up.d.ts +34 -0
  755. package/dist/node-esm/src/api/authentication/sms.d.ts +54 -0
  756. package/dist/node-esm/src/api/authentication/token.d.ts +37 -0
  757. package/dist/node-esm/src/api/errors.d.ts +129 -0
  758. package/dist/node-esm/src/api/index.d.ts +101 -0
  759. package/dist/node-esm/src/api/password_policy/get_password_policy.d.ts +48 -0
  760. package/dist/node-esm/src/api/project_config/get_project_config.d.ts +25 -0
  761. package/dist/node-esm/src/core/action_code_url.d.ts +73 -0
  762. package/dist/node-esm/src/core/auth/auth_event_manager.d.ts +34 -0
  763. package/dist/node-esm/src/core/auth/auth_impl.d.ts +133 -0
  764. package/dist/node-esm/src/core/auth/emulator.d.ts +42 -0
  765. package/dist/node-esm/src/core/auth/firebase_internal.d.ts +35 -0
  766. package/dist/node-esm/src/core/auth/initialize.d.ts +46 -0
  767. package/dist/node-esm/src/core/auth/middleware.d.ts +25 -0
  768. package/dist/node-esm/src/core/auth/password_policy_impl.d.ts +59 -0
  769. package/dist/node-esm/src/core/auth/register.d.ts +23 -0
  770. package/dist/node-esm/src/core/credentials/auth_credential.d.ts +75 -0
  771. package/dist/node-esm/src/core/credentials/email.d.ts +60 -0
  772. package/dist/node-esm/src/core/credentials/index.d.ts +23 -0
  773. package/dist/node-esm/src/core/credentials/oauth.d.ts +81 -0
  774. package/dist/node-esm/src/core/credentials/phone.d.ts +52 -0
  775. package/dist/node-esm/src/core/credentials/saml.d.ts +52 -0
  776. package/dist/node-esm/src/core/errors.d.ts +328 -0
  777. package/dist/node-esm/src/core/index.d.ts +230 -0
  778. package/dist/node-esm/src/core/persistence/in_memory.d.ts +35 -0
  779. package/dist/node-esm/src/core/persistence/index.d.ts +42 -0
  780. package/dist/node-esm/src/core/persistence/persistence_user_manager.d.ts +45 -0
  781. package/dist/node-esm/src/core/providers/email.d.ts +83 -0
  782. package/dist/node-esm/src/core/providers/facebook.d.ts +93 -0
  783. package/dist/node-esm/src/core/providers/federated.d.ts +64 -0
  784. package/dist/node-esm/src/core/providers/github.d.ts +89 -0
  785. package/dist/node-esm/src/core/providers/google.d.ts +96 -0
  786. package/dist/node-esm/src/core/providers/oauth.d.ts +151 -0
  787. package/dist/node-esm/src/core/providers/saml.d.ts +62 -0
  788. package/dist/node-esm/src/core/providers/twitter.d.ts +103 -0
  789. package/dist/node-esm/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  790. package/dist/node-esm/src/core/strategies/action_code_settings.d.ts +19 -0
  791. package/dist/node-esm/src/core/strategies/anonymous.d.ts +32 -0
  792. package/dist/node-esm/src/core/strategies/credential.d.ts +64 -0
  793. package/dist/node-esm/src/core/strategies/custom_token.d.ts +37 -0
  794. package/dist/node-esm/src/core/strategies/email.d.ts +104 -0
  795. package/dist/node-esm/src/core/strategies/email_and_password.d.ts +139 -0
  796. package/dist/node-esm/src/core/strategies/email_link.d.ts +107 -0
  797. package/dist/node-esm/src/core/strategies/idp.d.ts +32 -0
  798. package/dist/node-esm/src/core/strategies/redirect.d.ts +36 -0
  799. package/dist/node-esm/src/core/user/account_info.d.ts +68 -0
  800. package/dist/node-esm/src/core/user/additional_user_info.d.ts +31 -0
  801. package/dist/node-esm/src/core/user/id_token_result.d.ts +48 -0
  802. package/dist/node-esm/src/core/user/invalidation.d.ts +18 -0
  803. package/dist/node-esm/src/core/user/link_unlink.d.ts +30 -0
  804. package/dist/node-esm/src/core/user/proactive_refresh.d.ts +34 -0
  805. package/dist/node-esm/src/core/user/reauthenticate.d.ts +20 -0
  806. package/dist/node-esm/src/core/user/reload.d.ts +29 -0
  807. package/dist/node-esm/src/core/user/token_manager.d.ts +50 -0
  808. package/dist/node-esm/src/core/user/user_credential_impl.d.ts +37 -0
  809. package/dist/node-esm/src/core/user/user_impl.d.ts +74 -0
  810. package/dist/node-esm/src/core/user/user_metadata.d.ts +27 -0
  811. package/dist/node-esm/src/core/util/assert.d.ts +94 -0
  812. package/dist/node-esm/src/core/util/browser.d.ts +50 -0
  813. package/dist/node-esm/src/core/util/delay.d.ts +31 -0
  814. package/dist/node-esm/src/core/util/emulator.d.ts +18 -0
  815. package/dist/node-esm/src/core/util/event_id.d.ts +17 -0
  816. package/dist/node-esm/src/core/util/fetch_provider.d.ts +25 -0
  817. package/dist/node-esm/src/core/util/handler.d.ts +20 -0
  818. package/dist/node-esm/src/core/util/instantiator.d.ts +28 -0
  819. package/dist/node-esm/src/core/util/location.d.ts +19 -0
  820. package/dist/node-esm/src/core/util/log.d.ts +23 -0
  821. package/dist/node-esm/src/core/util/navigator.d.ts +21 -0
  822. package/dist/node-esm/src/core/util/providers.d.ts +23 -0
  823. package/dist/node-esm/src/core/util/resolver.d.ts +25 -0
  824. package/dist/node-esm/src/core/util/time.d.ts +17 -0
  825. package/dist/node-esm/src/core/util/validate_origin.d.ts +18 -0
  826. package/dist/node-esm/src/core/util/version.d.ts +31 -0
  827. package/dist/node-esm/src/index.d.ts +18 -0
  828. package/dist/node-esm/src/mfa/assertions/totp.d.ts +124 -0
  829. package/dist/node-esm/src/mfa/index.d.ts +18 -0
  830. package/dist/node-esm/src/mfa/mfa_assertion.d.ts +27 -0
  831. package/dist/node-esm/src/mfa/mfa_error.d.ts +35 -0
  832. package/dist/node-esm/src/mfa/mfa_info.d.ts +36 -0
  833. package/dist/node-esm/src/mfa/mfa_resolver.d.ts +41 -0
  834. package/dist/node-esm/src/mfa/mfa_session.d.ts +39 -0
  835. package/dist/node-esm/src/mfa/mfa_user.d.ts +38 -0
  836. package/dist/node-esm/src/model/application_verifier.d.ts +23 -0
  837. package/dist/node-esm/src/model/auth.d.ts +90 -0
  838. package/dist/node-esm/src/model/enum_maps.d.ts +98 -0
  839. package/dist/node-esm/src/model/enums.d.ts +74 -0
  840. package/dist/node-esm/src/model/id_token.d.ts +87 -0
  841. package/dist/node-esm/src/model/password_policy.d.ts +111 -0
  842. package/dist/node-esm/src/model/popup_redirect.d.ts +94 -0
  843. package/dist/node-esm/src/model/public_types.d.ts +1291 -0
  844. package/dist/node-esm/src/model/user.d.ts +83 -0
  845. package/dist/node-esm/src/platform_browser/auth_window.d.ts +37 -0
  846. package/dist/node-esm/src/platform_browser/iframe/gapi.d.ts +19 -0
  847. package/dist/node-esm/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  848. package/dist/node-esm/src/platform_browser/iframe/iframe.d.ts +18 -0
  849. package/dist/node-esm/src/platform_browser/index.d.ts +27 -0
  850. package/dist/node-esm/src/platform_browser/load_js.d.ts +29 -0
  851. package/dist/node-esm/src/platform_browser/messagechannel/index.d.ts +87 -0
  852. package/dist/node-esm/src/platform_browser/messagechannel/promise.d.ts +33 -0
  853. package/dist/node-esm/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  854. package/dist/node-esm/src/platform_browser/messagechannel/sender.d.ts +46 -0
  855. package/dist/node-esm/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  856. package/dist/node-esm/src/platform_browser/persistence/browser.d.ts +27 -0
  857. package/dist/node-esm/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  858. package/dist/node-esm/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  859. package/dist/node-esm/src/platform_browser/persistence/local_storage.d.ts +25 -0
  860. package/dist/node-esm/src/platform_browser/persistence/session_storage.d.ts +24 -0
  861. package/dist/node-esm/src/platform_browser/popup_redirect.d.ts +27 -0
  862. package/dist/node-esm/src/platform_browser/providers/phone.d.ts +154 -0
  863. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  864. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  865. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  866. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  867. package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  868. package/dist/node-esm/src/platform_browser/strategies/phone.d.ts +116 -0
  869. package/dist/node-esm/src/platform_browser/strategies/popup.d.ts +109 -0
  870. package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +176 -0
  871. package/dist/node-esm/src/platform_browser/util/popup.d.ts +24 -0
  872. package/dist/node-esm/src/platform_browser/util/worker.d.ts +20 -0
  873. package/dist/node-esm/src/platform_cordova/plugins.d.ts +42 -0
  874. package/dist/node-esm/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  875. package/dist/node-esm/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  876. package/dist/node-esm/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  877. package/dist/node-esm/src/platform_cordova/strategies/redirect.d.ts +20 -0
  878. package/dist/node-esm/src/platform_node/index.d.ts +51 -0
  879. package/dist/node-esm/src/platform_react_native/persistence/react_native.d.ts +25 -0
  880. package/dist/node-esm/test/helpers/api/helper.d.ts +22 -0
  881. package/dist/node-esm/test/helpers/delay.d.ts +20 -0
  882. package/dist/node-esm/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  883. package/dist/node-esm/test/helpers/fake_service_worker.d.ts +22 -0
  884. package/dist/node-esm/test/helpers/id_token_response.d.ts +18 -0
  885. package/dist/node-esm/test/helpers/iframe_event.d.ts +19 -0
  886. package/dist/node-esm/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  887. package/dist/node-esm/test/helpers/integration/helpers.d.ts +32 -0
  888. package/dist/node-esm/test/helpers/integration/settings.d.ts +23 -0
  889. package/dist/node-esm/test/helpers/jwt.d.ts +17 -0
  890. package/dist/node-esm/test/helpers/mock_auth.d.ts +47 -0
  891. package/dist/node-esm/test/helpers/mock_auth_credential.d.ts +31 -0
  892. package/dist/node-esm/test/helpers/mock_fetch.d.ts +31 -0
  893. package/dist/node-esm/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  894. package/dist/node-esm/test/helpers/redirect_persistence.d.ts +24 -0
  895. package/dist/node-esm/test/helpers/timeout_stub.d.ts +34 -0
  896. package/dist/node-esm/test/integration/flows/middleware_test_generator.d.ts +18 -0
  897. package/dist/node-esm/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  898. package/dist/node-esm/test/integration/webdriver/util/functions.d.ts +81 -0
  899. package/dist/node-esm/test/integration/webdriver/util/idp_page.d.ts +31 -0
  900. package/dist/node-esm/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  901. package/dist/node-esm/test/integration/webdriver/util/test_runner.d.ts +19 -0
  902. package/dist/node-esm/test/integration/webdriver/util/test_server.d.ts +27 -0
  903. package/dist/node-esm/test/integration/webdriver/util/ui_page.d.ts +33 -0
  904. package/dist/node-esm/totp-413dc172.js +7581 -0
  905. package/dist/node-esm/totp-413dc172.js.map +1 -0
  906. package/dist/rn/index-6b98721f.js +8678 -0
  907. package/dist/rn/index-6b98721f.js.map +1 -0
  908. package/dist/rn/index.cordova.d.ts +32 -0
  909. package/dist/rn/index.d.ts +38 -0
  910. package/dist/rn/index.doc.d.ts +24 -0
  911. package/dist/rn/index.js +209 -0
  912. package/dist/rn/index.js.map +1 -0
  913. package/dist/rn/index.node.d.ts +17 -0
  914. package/dist/rn/index.rn.d.ts +40 -0
  915. package/dist/rn/index.shared.d.ts +19 -0
  916. package/dist/rn/index.web-extension.d.ts +31 -0
  917. package/dist/rn/index.webworker.d.ts +21 -0
  918. package/dist/rn/internal/index.d.ts +42 -0
  919. package/dist/rn/internal.js +3266 -0
  920. package/dist/rn/internal.js.map +1 -0
  921. package/dist/rn/scripts/run_node_tests.d.ts +17 -0
  922. package/dist/rn/src/api/account_management/account.d.ts +59 -0
  923. package/dist/rn/src/api/account_management/email_and_password.d.ts +49 -0
  924. package/dist/rn/src/api/account_management/mfa.d.ts +107 -0
  925. package/dist/rn/src/api/account_management/profile.d.ts +29 -0
  926. package/dist/rn/src/api/authentication/create_auth_uri.d.ts +26 -0
  927. package/dist/rn/src/api/authentication/custom_token.d.ts +26 -0
  928. package/dist/rn/src/api/authentication/email_and_password.d.ts +86 -0
  929. package/dist/rn/src/api/authentication/email_link.d.ts +32 -0
  930. package/dist/rn/src/api/authentication/idp.d.ts +40 -0
  931. package/dist/rn/src/api/authentication/mfa.d.ts +73 -0
  932. package/dist/rn/src/api/authentication/recaptcha.d.ts +34 -0
  933. package/dist/rn/src/api/authentication/sign_up.d.ts +34 -0
  934. package/dist/rn/src/api/authentication/sms.d.ts +54 -0
  935. package/dist/rn/src/api/authentication/token.d.ts +37 -0
  936. package/dist/rn/src/api/errors.d.ts +129 -0
  937. package/dist/rn/src/api/index.d.ts +101 -0
  938. package/dist/rn/src/api/password_policy/get_password_policy.d.ts +48 -0
  939. package/dist/rn/src/api/project_config/get_project_config.d.ts +25 -0
  940. package/dist/rn/src/core/action_code_url.d.ts +73 -0
  941. package/dist/rn/src/core/auth/auth_event_manager.d.ts +34 -0
  942. package/dist/rn/src/core/auth/auth_impl.d.ts +133 -0
  943. package/dist/rn/src/core/auth/emulator.d.ts +42 -0
  944. package/dist/rn/src/core/auth/firebase_internal.d.ts +35 -0
  945. package/dist/rn/src/core/auth/initialize.d.ts +46 -0
  946. package/dist/rn/src/core/auth/middleware.d.ts +25 -0
  947. package/dist/rn/src/core/auth/password_policy_impl.d.ts +59 -0
  948. package/dist/rn/src/core/auth/register.d.ts +23 -0
  949. package/dist/rn/src/core/credentials/auth_credential.d.ts +75 -0
  950. package/dist/rn/src/core/credentials/email.d.ts +60 -0
  951. package/dist/rn/src/core/credentials/index.d.ts +23 -0
  952. package/dist/rn/src/core/credentials/oauth.d.ts +81 -0
  953. package/dist/rn/src/core/credentials/phone.d.ts +52 -0
  954. package/dist/rn/src/core/credentials/saml.d.ts +52 -0
  955. package/dist/rn/src/core/errors.d.ts +328 -0
  956. package/dist/rn/src/core/index.d.ts +230 -0
  957. package/dist/rn/src/core/persistence/in_memory.d.ts +35 -0
  958. package/dist/rn/src/core/persistence/index.d.ts +42 -0
  959. package/dist/rn/src/core/persistence/persistence_user_manager.d.ts +45 -0
  960. package/dist/rn/src/core/providers/email.d.ts +83 -0
  961. package/dist/rn/src/core/providers/facebook.d.ts +93 -0
  962. package/dist/rn/src/core/providers/federated.d.ts +64 -0
  963. package/dist/rn/src/core/providers/github.d.ts +89 -0
  964. package/dist/rn/src/core/providers/google.d.ts +96 -0
  965. package/dist/rn/src/core/providers/oauth.d.ts +151 -0
  966. package/dist/rn/src/core/providers/saml.d.ts +62 -0
  967. package/dist/rn/src/core/providers/twitter.d.ts +103 -0
  968. package/dist/rn/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  969. package/dist/rn/src/core/strategies/action_code_settings.d.ts +19 -0
  970. package/dist/rn/src/core/strategies/anonymous.d.ts +32 -0
  971. package/dist/rn/src/core/strategies/credential.d.ts +64 -0
  972. package/dist/rn/src/core/strategies/custom_token.d.ts +37 -0
  973. package/dist/rn/src/core/strategies/email.d.ts +104 -0
  974. package/dist/rn/src/core/strategies/email_and_password.d.ts +139 -0
  975. package/dist/rn/src/core/strategies/email_link.d.ts +107 -0
  976. package/dist/rn/src/core/strategies/idp.d.ts +32 -0
  977. package/dist/rn/src/core/strategies/redirect.d.ts +36 -0
  978. package/dist/rn/src/core/user/account_info.d.ts +68 -0
  979. package/dist/rn/src/core/user/additional_user_info.d.ts +31 -0
  980. package/dist/rn/src/core/user/id_token_result.d.ts +48 -0
  981. package/dist/rn/src/core/user/invalidation.d.ts +18 -0
  982. package/dist/rn/src/core/user/link_unlink.d.ts +30 -0
  983. package/dist/rn/src/core/user/proactive_refresh.d.ts +34 -0
  984. package/dist/rn/src/core/user/reauthenticate.d.ts +20 -0
  985. package/dist/rn/src/core/user/reload.d.ts +29 -0
  986. package/dist/rn/src/core/user/token_manager.d.ts +50 -0
  987. package/dist/rn/src/core/user/user_credential_impl.d.ts +37 -0
  988. package/dist/rn/src/core/user/user_impl.d.ts +74 -0
  989. package/dist/rn/src/core/user/user_metadata.d.ts +27 -0
  990. package/dist/rn/src/core/util/assert.d.ts +94 -0
  991. package/dist/rn/src/core/util/browser.d.ts +50 -0
  992. package/dist/rn/src/core/util/delay.d.ts +31 -0
  993. package/dist/rn/src/core/util/emulator.d.ts +18 -0
  994. package/dist/rn/src/core/util/event_id.d.ts +17 -0
  995. package/dist/rn/src/core/util/fetch_provider.d.ts +25 -0
  996. package/dist/rn/src/core/util/handler.d.ts +20 -0
  997. package/dist/rn/src/core/util/instantiator.d.ts +28 -0
  998. package/dist/rn/src/core/util/location.d.ts +19 -0
  999. package/dist/rn/src/core/util/log.d.ts +23 -0
  1000. package/dist/rn/src/core/util/navigator.d.ts +21 -0
  1001. package/dist/rn/src/core/util/providers.d.ts +23 -0
  1002. package/dist/rn/src/core/util/resolver.d.ts +25 -0
  1003. package/dist/rn/src/core/util/time.d.ts +17 -0
  1004. package/dist/rn/src/core/util/validate_origin.d.ts +18 -0
  1005. package/dist/rn/src/core/util/version.d.ts +31 -0
  1006. package/dist/rn/src/index.d.ts +18 -0
  1007. package/dist/rn/src/mfa/assertions/totp.d.ts +124 -0
  1008. package/dist/rn/src/mfa/index.d.ts +18 -0
  1009. package/dist/rn/src/mfa/mfa_assertion.d.ts +27 -0
  1010. package/dist/rn/src/mfa/mfa_error.d.ts +35 -0
  1011. package/dist/rn/src/mfa/mfa_info.d.ts +36 -0
  1012. package/dist/rn/src/mfa/mfa_resolver.d.ts +41 -0
  1013. package/dist/rn/src/mfa/mfa_session.d.ts +39 -0
  1014. package/dist/rn/src/mfa/mfa_user.d.ts +38 -0
  1015. package/dist/rn/src/model/application_verifier.d.ts +23 -0
  1016. package/dist/rn/src/model/auth.d.ts +90 -0
  1017. package/dist/rn/src/model/enum_maps.d.ts +98 -0
  1018. package/dist/rn/src/model/enums.d.ts +74 -0
  1019. package/dist/rn/src/model/id_token.d.ts +87 -0
  1020. package/dist/rn/src/model/password_policy.d.ts +111 -0
  1021. package/dist/rn/src/model/popup_redirect.d.ts +94 -0
  1022. package/dist/rn/src/model/public_types.d.ts +1291 -0
  1023. package/dist/rn/src/model/user.d.ts +83 -0
  1024. package/dist/rn/src/platform_browser/auth_window.d.ts +37 -0
  1025. package/dist/rn/src/platform_browser/iframe/gapi.d.ts +19 -0
  1026. package/dist/rn/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  1027. package/dist/rn/src/platform_browser/iframe/iframe.d.ts +18 -0
  1028. package/dist/rn/src/platform_browser/index.d.ts +27 -0
  1029. package/dist/rn/src/platform_browser/load_js.d.ts +29 -0
  1030. package/dist/rn/src/platform_browser/messagechannel/index.d.ts +87 -0
  1031. package/dist/rn/src/platform_browser/messagechannel/promise.d.ts +33 -0
  1032. package/dist/rn/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  1033. package/dist/rn/src/platform_browser/messagechannel/sender.d.ts +46 -0
  1034. package/dist/rn/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  1035. package/dist/rn/src/platform_browser/persistence/browser.d.ts +27 -0
  1036. package/dist/rn/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  1037. package/dist/rn/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  1038. package/dist/rn/src/platform_browser/persistence/local_storage.d.ts +25 -0
  1039. package/dist/rn/src/platform_browser/persistence/session_storage.d.ts +24 -0
  1040. package/dist/rn/src/platform_browser/popup_redirect.d.ts +27 -0
  1041. package/dist/rn/src/platform_browser/providers/phone.d.ts +154 -0
  1042. package/dist/rn/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  1043. package/dist/rn/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  1044. package/dist/rn/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  1045. package/dist/rn/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  1046. package/dist/rn/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  1047. package/dist/rn/src/platform_browser/strategies/phone.d.ts +116 -0
  1048. package/dist/rn/src/platform_browser/strategies/popup.d.ts +109 -0
  1049. package/dist/rn/src/platform_browser/strategies/redirect.d.ts +176 -0
  1050. package/dist/rn/src/platform_browser/util/popup.d.ts +24 -0
  1051. package/dist/rn/src/platform_browser/util/worker.d.ts +20 -0
  1052. package/dist/rn/src/platform_cordova/plugins.d.ts +42 -0
  1053. package/dist/rn/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  1054. package/dist/rn/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  1055. package/dist/rn/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  1056. package/dist/rn/src/platform_cordova/strategies/redirect.d.ts +20 -0
  1057. package/dist/rn/src/platform_node/index.d.ts +51 -0
  1058. package/dist/rn/src/platform_react_native/persistence/react_native.d.ts +25 -0
  1059. package/dist/rn/test/helpers/api/helper.d.ts +22 -0
  1060. package/dist/rn/test/helpers/delay.d.ts +20 -0
  1061. package/dist/rn/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  1062. package/dist/rn/test/helpers/fake_service_worker.d.ts +22 -0
  1063. package/dist/rn/test/helpers/id_token_response.d.ts +18 -0
  1064. package/dist/rn/test/helpers/iframe_event.d.ts +19 -0
  1065. package/dist/rn/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  1066. package/dist/rn/test/helpers/integration/helpers.d.ts +32 -0
  1067. package/dist/rn/test/helpers/integration/settings.d.ts +23 -0
  1068. package/dist/rn/test/helpers/jwt.d.ts +17 -0
  1069. package/dist/rn/test/helpers/mock_auth.d.ts +47 -0
  1070. package/dist/rn/test/helpers/mock_auth_credential.d.ts +31 -0
  1071. package/dist/rn/test/helpers/mock_fetch.d.ts +31 -0
  1072. package/dist/rn/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  1073. package/dist/rn/test/helpers/redirect_persistence.d.ts +24 -0
  1074. package/dist/rn/test/helpers/timeout_stub.d.ts +34 -0
  1075. package/dist/rn/test/integration/flows/middleware_test_generator.d.ts +18 -0
  1076. package/dist/rn/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  1077. package/dist/rn/test/integration/webdriver/util/functions.d.ts +81 -0
  1078. package/dist/rn/test/integration/webdriver/util/idp_page.d.ts +31 -0
  1079. package/dist/rn/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  1080. package/dist/rn/test/integration/webdriver/util/test_runner.d.ts +19 -0
  1081. package/dist/rn/test/integration/webdriver/util/test_server.d.ts +27 -0
  1082. package/dist/rn/test/integration/webdriver/util/ui_page.d.ts +33 -0
  1083. package/dist/scripts/run_node_tests.d.ts +17 -0
  1084. package/dist/src/api/account_management/account.d.ts +59 -0
  1085. package/dist/src/api/account_management/email_and_password.d.ts +49 -0
  1086. package/dist/src/api/account_management/mfa.d.ts +107 -0
  1087. package/dist/src/api/account_management/profile.d.ts +29 -0
  1088. package/dist/src/api/authentication/create_auth_uri.d.ts +26 -0
  1089. package/dist/src/api/authentication/custom_token.d.ts +26 -0
  1090. package/dist/src/api/authentication/email_and_password.d.ts +86 -0
  1091. package/dist/src/api/authentication/email_link.d.ts +32 -0
  1092. package/dist/src/api/authentication/idp.d.ts +40 -0
  1093. package/dist/src/api/authentication/mfa.d.ts +73 -0
  1094. package/dist/src/api/authentication/recaptcha.d.ts +34 -0
  1095. package/dist/src/api/authentication/sign_up.d.ts +34 -0
  1096. package/dist/src/api/authentication/sms.d.ts +54 -0
  1097. package/dist/src/api/authentication/token.d.ts +37 -0
  1098. package/dist/src/api/errors.d.ts +129 -0
  1099. package/dist/src/api/index.d.ts +101 -0
  1100. package/dist/src/api/password_policy/get_password_policy.d.ts +48 -0
  1101. package/dist/src/api/project_config/get_project_config.d.ts +25 -0
  1102. package/dist/src/core/action_code_url.d.ts +73 -0
  1103. package/dist/src/core/auth/auth_event_manager.d.ts +34 -0
  1104. package/dist/src/core/auth/auth_impl.d.ts +133 -0
  1105. package/dist/src/core/auth/emulator.d.ts +42 -0
  1106. package/dist/src/core/auth/firebase_internal.d.ts +35 -0
  1107. package/dist/src/core/auth/initialize.d.ts +46 -0
  1108. package/dist/src/core/auth/middleware.d.ts +25 -0
  1109. package/dist/src/core/auth/password_policy_impl.d.ts +59 -0
  1110. package/dist/src/core/auth/register.d.ts +23 -0
  1111. package/dist/src/core/credentials/auth_credential.d.ts +75 -0
  1112. package/dist/src/core/credentials/email.d.ts +60 -0
  1113. package/dist/src/core/credentials/index.d.ts +23 -0
  1114. package/dist/src/core/credentials/oauth.d.ts +81 -0
  1115. package/dist/src/core/credentials/phone.d.ts +52 -0
  1116. package/dist/src/core/credentials/saml.d.ts +52 -0
  1117. package/dist/src/core/errors.d.ts +328 -0
  1118. package/dist/src/core/index.d.ts +230 -0
  1119. package/dist/src/core/persistence/in_memory.d.ts +35 -0
  1120. package/dist/src/core/persistence/index.d.ts +42 -0
  1121. package/dist/src/core/persistence/persistence_user_manager.d.ts +45 -0
  1122. package/dist/src/core/providers/email.d.ts +83 -0
  1123. package/dist/src/core/providers/facebook.d.ts +93 -0
  1124. package/dist/src/core/providers/federated.d.ts +64 -0
  1125. package/dist/src/core/providers/github.d.ts +89 -0
  1126. package/dist/src/core/providers/google.d.ts +96 -0
  1127. package/dist/src/core/providers/oauth.d.ts +151 -0
  1128. package/dist/src/core/providers/saml.d.ts +62 -0
  1129. package/dist/src/core/providers/twitter.d.ts +103 -0
  1130. package/dist/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  1131. package/dist/src/core/strategies/action_code_settings.d.ts +19 -0
  1132. package/dist/src/core/strategies/anonymous.d.ts +32 -0
  1133. package/dist/src/core/strategies/credential.d.ts +64 -0
  1134. package/dist/src/core/strategies/custom_token.d.ts +37 -0
  1135. package/dist/src/core/strategies/email.d.ts +104 -0
  1136. package/dist/src/core/strategies/email_and_password.d.ts +139 -0
  1137. package/dist/src/core/strategies/email_link.d.ts +107 -0
  1138. package/dist/src/core/strategies/idp.d.ts +32 -0
  1139. package/dist/src/core/strategies/redirect.d.ts +36 -0
  1140. package/dist/src/core/user/account_info.d.ts +68 -0
  1141. package/dist/src/core/user/additional_user_info.d.ts +31 -0
  1142. package/dist/src/core/user/id_token_result.d.ts +48 -0
  1143. package/dist/src/core/user/invalidation.d.ts +18 -0
  1144. package/dist/src/core/user/link_unlink.d.ts +30 -0
  1145. package/dist/src/core/user/proactive_refresh.d.ts +34 -0
  1146. package/dist/src/core/user/reauthenticate.d.ts +20 -0
  1147. package/dist/src/core/user/reload.d.ts +29 -0
  1148. package/dist/src/core/user/token_manager.d.ts +50 -0
  1149. package/dist/src/core/user/user_credential_impl.d.ts +37 -0
  1150. package/dist/src/core/user/user_impl.d.ts +74 -0
  1151. package/dist/src/core/user/user_metadata.d.ts +27 -0
  1152. package/dist/src/core/util/assert.d.ts +94 -0
  1153. package/dist/src/core/util/browser.d.ts +50 -0
  1154. package/dist/src/core/util/delay.d.ts +31 -0
  1155. package/dist/src/core/util/emulator.d.ts +18 -0
  1156. package/dist/src/core/util/event_id.d.ts +17 -0
  1157. package/dist/src/core/util/fetch_provider.d.ts +25 -0
  1158. package/dist/src/core/util/handler.d.ts +20 -0
  1159. package/dist/src/core/util/instantiator.d.ts +28 -0
  1160. package/dist/src/core/util/location.d.ts +19 -0
  1161. package/dist/src/core/util/log.d.ts +23 -0
  1162. package/dist/src/core/util/navigator.d.ts +21 -0
  1163. package/dist/src/core/util/providers.d.ts +23 -0
  1164. package/dist/src/core/util/resolver.d.ts +25 -0
  1165. package/dist/src/core/util/time.d.ts +17 -0
  1166. package/dist/src/core/util/validate_origin.d.ts +18 -0
  1167. package/dist/src/core/util/version.d.ts +31 -0
  1168. package/dist/src/index.d.ts +18 -0
  1169. package/dist/src/mfa/assertions/totp.d.ts +124 -0
  1170. package/dist/src/mfa/index.d.ts +18 -0
  1171. package/dist/src/mfa/mfa_assertion.d.ts +27 -0
  1172. package/dist/src/mfa/mfa_error.d.ts +35 -0
  1173. package/dist/src/mfa/mfa_info.d.ts +36 -0
  1174. package/dist/src/mfa/mfa_resolver.d.ts +41 -0
  1175. package/dist/src/mfa/mfa_session.d.ts +39 -0
  1176. package/dist/src/mfa/mfa_user.d.ts +38 -0
  1177. package/dist/src/model/application_verifier.d.ts +23 -0
  1178. package/dist/src/model/auth.d.ts +90 -0
  1179. package/dist/src/model/enum_maps.d.ts +98 -0
  1180. package/dist/src/model/enums.d.ts +74 -0
  1181. package/dist/src/model/id_token.d.ts +87 -0
  1182. package/dist/src/model/password_policy.d.ts +111 -0
  1183. package/dist/src/model/popup_redirect.d.ts +94 -0
  1184. package/dist/src/model/public_types.d.ts +1291 -0
  1185. package/dist/src/model/user.d.ts +83 -0
  1186. package/dist/src/platform_browser/auth_window.d.ts +37 -0
  1187. package/dist/src/platform_browser/iframe/gapi.d.ts +19 -0
  1188. package/dist/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  1189. package/dist/src/platform_browser/iframe/iframe.d.ts +18 -0
  1190. package/dist/src/platform_browser/index.d.ts +27 -0
  1191. package/dist/src/platform_browser/load_js.d.ts +29 -0
  1192. package/dist/src/platform_browser/messagechannel/index.d.ts +87 -0
  1193. package/dist/src/platform_browser/messagechannel/promise.d.ts +33 -0
  1194. package/dist/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  1195. package/dist/src/platform_browser/messagechannel/sender.d.ts +46 -0
  1196. package/dist/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  1197. package/dist/src/platform_browser/persistence/browser.d.ts +27 -0
  1198. package/dist/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  1199. package/dist/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  1200. package/dist/src/platform_browser/persistence/local_storage.d.ts +25 -0
  1201. package/dist/src/platform_browser/persistence/session_storage.d.ts +24 -0
  1202. package/dist/src/platform_browser/popup_redirect.d.ts +27 -0
  1203. package/dist/src/platform_browser/providers/phone.d.ts +154 -0
  1204. package/dist/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  1205. package/dist/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  1206. package/dist/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  1207. package/dist/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  1208. package/dist/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  1209. package/dist/src/platform_browser/strategies/phone.d.ts +116 -0
  1210. package/dist/src/platform_browser/strategies/popup.d.ts +109 -0
  1211. package/dist/src/platform_browser/strategies/redirect.d.ts +176 -0
  1212. package/dist/src/platform_browser/util/popup.d.ts +24 -0
  1213. package/dist/src/platform_browser/util/worker.d.ts +20 -0
  1214. package/dist/src/platform_cordova/plugins.d.ts +42 -0
  1215. package/dist/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  1216. package/dist/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  1217. package/dist/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  1218. package/dist/src/platform_cordova/strategies/redirect.d.ts +20 -0
  1219. package/dist/src/platform_node/index.d.ts +51 -0
  1220. package/dist/src/platform_react_native/persistence/react_native.d.ts +25 -0
  1221. package/dist/test/helpers/api/helper.d.ts +22 -0
  1222. package/dist/test/helpers/delay.d.ts +20 -0
  1223. package/dist/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  1224. package/dist/test/helpers/fake_service_worker.d.ts +22 -0
  1225. package/dist/test/helpers/id_token_response.d.ts +18 -0
  1226. package/dist/test/helpers/iframe_event.d.ts +19 -0
  1227. package/dist/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  1228. package/dist/test/helpers/integration/helpers.d.ts +32 -0
  1229. package/dist/test/helpers/integration/settings.d.ts +23 -0
  1230. package/dist/test/helpers/jwt.d.ts +17 -0
  1231. package/dist/test/helpers/mock_auth.d.ts +47 -0
  1232. package/dist/test/helpers/mock_auth_credential.d.ts +31 -0
  1233. package/dist/test/helpers/mock_fetch.d.ts +31 -0
  1234. package/dist/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  1235. package/dist/test/helpers/redirect_persistence.d.ts +24 -0
  1236. package/dist/test/helpers/timeout_stub.d.ts +34 -0
  1237. package/dist/test/integration/flows/middleware_test_generator.d.ts +18 -0
  1238. package/dist/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  1239. package/dist/test/integration/webdriver/util/functions.d.ts +81 -0
  1240. package/dist/test/integration/webdriver/util/idp_page.d.ts +31 -0
  1241. package/dist/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  1242. package/dist/test/integration/webdriver/util/test_runner.d.ts +19 -0
  1243. package/dist/test/integration/webdriver/util/test_server.d.ts +27 -0
  1244. package/dist/test/integration/webdriver/util/ui_page.d.ts +33 -0
  1245. package/dist/tsdoc-metadata.json +11 -0
  1246. package/dist/web-extension-cjs/index.cordova.d.ts +32 -0
  1247. package/dist/web-extension-cjs/index.d.ts +38 -0
  1248. package/dist/web-extension-cjs/index.doc.d.ts +24 -0
  1249. package/dist/web-extension-cjs/index.js +113 -0
  1250. package/dist/web-extension-cjs/index.js.map +1 -0
  1251. package/dist/web-extension-cjs/index.node.d.ts +17 -0
  1252. package/dist/web-extension-cjs/index.rn.d.ts +40 -0
  1253. package/dist/web-extension-cjs/index.shared.d.ts +19 -0
  1254. package/dist/web-extension-cjs/index.web-extension.d.ts +31 -0
  1255. package/dist/web-extension-cjs/index.webworker.d.ts +21 -0
  1256. package/dist/web-extension-cjs/internal/index.d.ts +42 -0
  1257. package/dist/web-extension-cjs/internal.js +3569 -0
  1258. package/dist/web-extension-cjs/internal.js.map +1 -0
  1259. package/dist/web-extension-cjs/register-e72afd7b.js +8375 -0
  1260. package/dist/web-extension-cjs/register-e72afd7b.js.map +1 -0
  1261. package/dist/web-extension-cjs/scripts/run_node_tests.d.ts +17 -0
  1262. package/dist/web-extension-cjs/src/api/account_management/account.d.ts +59 -0
  1263. package/dist/web-extension-cjs/src/api/account_management/email_and_password.d.ts +49 -0
  1264. package/dist/web-extension-cjs/src/api/account_management/mfa.d.ts +107 -0
  1265. package/dist/web-extension-cjs/src/api/account_management/profile.d.ts +29 -0
  1266. package/dist/web-extension-cjs/src/api/authentication/create_auth_uri.d.ts +26 -0
  1267. package/dist/web-extension-cjs/src/api/authentication/custom_token.d.ts +26 -0
  1268. package/dist/web-extension-cjs/src/api/authentication/email_and_password.d.ts +86 -0
  1269. package/dist/web-extension-cjs/src/api/authentication/email_link.d.ts +32 -0
  1270. package/dist/web-extension-cjs/src/api/authentication/idp.d.ts +40 -0
  1271. package/dist/web-extension-cjs/src/api/authentication/mfa.d.ts +73 -0
  1272. package/dist/web-extension-cjs/src/api/authentication/recaptcha.d.ts +34 -0
  1273. package/dist/web-extension-cjs/src/api/authentication/sign_up.d.ts +34 -0
  1274. package/dist/web-extension-cjs/src/api/authentication/sms.d.ts +54 -0
  1275. package/dist/web-extension-cjs/src/api/authentication/token.d.ts +37 -0
  1276. package/dist/web-extension-cjs/src/api/errors.d.ts +129 -0
  1277. package/dist/web-extension-cjs/src/api/index.d.ts +101 -0
  1278. package/dist/web-extension-cjs/src/api/password_policy/get_password_policy.d.ts +48 -0
  1279. package/dist/web-extension-cjs/src/api/project_config/get_project_config.d.ts +25 -0
  1280. package/dist/web-extension-cjs/src/core/action_code_url.d.ts +73 -0
  1281. package/dist/web-extension-cjs/src/core/auth/auth_event_manager.d.ts +34 -0
  1282. package/dist/web-extension-cjs/src/core/auth/auth_impl.d.ts +133 -0
  1283. package/dist/web-extension-cjs/src/core/auth/emulator.d.ts +42 -0
  1284. package/dist/web-extension-cjs/src/core/auth/firebase_internal.d.ts +35 -0
  1285. package/dist/web-extension-cjs/src/core/auth/initialize.d.ts +46 -0
  1286. package/dist/web-extension-cjs/src/core/auth/middleware.d.ts +25 -0
  1287. package/dist/web-extension-cjs/src/core/auth/password_policy_impl.d.ts +59 -0
  1288. package/dist/web-extension-cjs/src/core/auth/register.d.ts +23 -0
  1289. package/dist/web-extension-cjs/src/core/credentials/auth_credential.d.ts +75 -0
  1290. package/dist/web-extension-cjs/src/core/credentials/email.d.ts +60 -0
  1291. package/dist/web-extension-cjs/src/core/credentials/index.d.ts +23 -0
  1292. package/dist/web-extension-cjs/src/core/credentials/oauth.d.ts +81 -0
  1293. package/dist/web-extension-cjs/src/core/credentials/phone.d.ts +52 -0
  1294. package/dist/web-extension-cjs/src/core/credentials/saml.d.ts +52 -0
  1295. package/dist/web-extension-cjs/src/core/errors.d.ts +328 -0
  1296. package/dist/web-extension-cjs/src/core/index.d.ts +230 -0
  1297. package/dist/web-extension-cjs/src/core/persistence/in_memory.d.ts +35 -0
  1298. package/dist/web-extension-cjs/src/core/persistence/index.d.ts +42 -0
  1299. package/dist/web-extension-cjs/src/core/persistence/persistence_user_manager.d.ts +45 -0
  1300. package/dist/web-extension-cjs/src/core/providers/email.d.ts +83 -0
  1301. package/dist/web-extension-cjs/src/core/providers/facebook.d.ts +93 -0
  1302. package/dist/web-extension-cjs/src/core/providers/federated.d.ts +64 -0
  1303. package/dist/web-extension-cjs/src/core/providers/github.d.ts +89 -0
  1304. package/dist/web-extension-cjs/src/core/providers/google.d.ts +96 -0
  1305. package/dist/web-extension-cjs/src/core/providers/oauth.d.ts +151 -0
  1306. package/dist/web-extension-cjs/src/core/providers/saml.d.ts +62 -0
  1307. package/dist/web-extension-cjs/src/core/providers/twitter.d.ts +103 -0
  1308. package/dist/web-extension-cjs/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  1309. package/dist/web-extension-cjs/src/core/strategies/action_code_settings.d.ts +19 -0
  1310. package/dist/web-extension-cjs/src/core/strategies/anonymous.d.ts +32 -0
  1311. package/dist/web-extension-cjs/src/core/strategies/credential.d.ts +64 -0
  1312. package/dist/web-extension-cjs/src/core/strategies/custom_token.d.ts +37 -0
  1313. package/dist/web-extension-cjs/src/core/strategies/email.d.ts +104 -0
  1314. package/dist/web-extension-cjs/src/core/strategies/email_and_password.d.ts +139 -0
  1315. package/dist/web-extension-cjs/src/core/strategies/email_link.d.ts +107 -0
  1316. package/dist/web-extension-cjs/src/core/strategies/idp.d.ts +32 -0
  1317. package/dist/web-extension-cjs/src/core/strategies/redirect.d.ts +36 -0
  1318. package/dist/web-extension-cjs/src/core/user/account_info.d.ts +68 -0
  1319. package/dist/web-extension-cjs/src/core/user/additional_user_info.d.ts +31 -0
  1320. package/dist/web-extension-cjs/src/core/user/id_token_result.d.ts +48 -0
  1321. package/dist/web-extension-cjs/src/core/user/invalidation.d.ts +18 -0
  1322. package/dist/web-extension-cjs/src/core/user/link_unlink.d.ts +30 -0
  1323. package/dist/web-extension-cjs/src/core/user/proactive_refresh.d.ts +34 -0
  1324. package/dist/web-extension-cjs/src/core/user/reauthenticate.d.ts +20 -0
  1325. package/dist/web-extension-cjs/src/core/user/reload.d.ts +29 -0
  1326. package/dist/web-extension-cjs/src/core/user/token_manager.d.ts +50 -0
  1327. package/dist/web-extension-cjs/src/core/user/user_credential_impl.d.ts +37 -0
  1328. package/dist/web-extension-cjs/src/core/user/user_impl.d.ts +74 -0
  1329. package/dist/web-extension-cjs/src/core/user/user_metadata.d.ts +27 -0
  1330. package/dist/web-extension-cjs/src/core/util/assert.d.ts +94 -0
  1331. package/dist/web-extension-cjs/src/core/util/browser.d.ts +50 -0
  1332. package/dist/web-extension-cjs/src/core/util/delay.d.ts +31 -0
  1333. package/dist/web-extension-cjs/src/core/util/emulator.d.ts +18 -0
  1334. package/dist/web-extension-cjs/src/core/util/event_id.d.ts +17 -0
  1335. package/dist/web-extension-cjs/src/core/util/fetch_provider.d.ts +25 -0
  1336. package/dist/web-extension-cjs/src/core/util/handler.d.ts +20 -0
  1337. package/dist/web-extension-cjs/src/core/util/instantiator.d.ts +28 -0
  1338. package/dist/web-extension-cjs/src/core/util/location.d.ts +19 -0
  1339. package/dist/web-extension-cjs/src/core/util/log.d.ts +23 -0
  1340. package/dist/web-extension-cjs/src/core/util/navigator.d.ts +21 -0
  1341. package/dist/web-extension-cjs/src/core/util/providers.d.ts +23 -0
  1342. package/dist/web-extension-cjs/src/core/util/resolver.d.ts +25 -0
  1343. package/dist/web-extension-cjs/src/core/util/time.d.ts +17 -0
  1344. package/dist/web-extension-cjs/src/core/util/validate_origin.d.ts +18 -0
  1345. package/dist/web-extension-cjs/src/core/util/version.d.ts +31 -0
  1346. package/dist/web-extension-cjs/src/index.d.ts +18 -0
  1347. package/dist/web-extension-cjs/src/mfa/assertions/totp.d.ts +124 -0
  1348. package/dist/web-extension-cjs/src/mfa/index.d.ts +18 -0
  1349. package/dist/web-extension-cjs/src/mfa/mfa_assertion.d.ts +27 -0
  1350. package/dist/web-extension-cjs/src/mfa/mfa_error.d.ts +35 -0
  1351. package/dist/web-extension-cjs/src/mfa/mfa_info.d.ts +36 -0
  1352. package/dist/web-extension-cjs/src/mfa/mfa_resolver.d.ts +41 -0
  1353. package/dist/web-extension-cjs/src/mfa/mfa_session.d.ts +39 -0
  1354. package/dist/web-extension-cjs/src/mfa/mfa_user.d.ts +38 -0
  1355. package/dist/web-extension-cjs/src/model/application_verifier.d.ts +23 -0
  1356. package/dist/web-extension-cjs/src/model/auth.d.ts +90 -0
  1357. package/dist/web-extension-cjs/src/model/enum_maps.d.ts +98 -0
  1358. package/dist/web-extension-cjs/src/model/enums.d.ts +74 -0
  1359. package/dist/web-extension-cjs/src/model/id_token.d.ts +87 -0
  1360. package/dist/web-extension-cjs/src/model/password_policy.d.ts +111 -0
  1361. package/dist/web-extension-cjs/src/model/popup_redirect.d.ts +94 -0
  1362. package/dist/web-extension-cjs/src/model/public_types.d.ts +1291 -0
  1363. package/dist/web-extension-cjs/src/model/user.d.ts +83 -0
  1364. package/dist/web-extension-cjs/src/platform_browser/auth_window.d.ts +37 -0
  1365. package/dist/web-extension-cjs/src/platform_browser/iframe/gapi.d.ts +19 -0
  1366. package/dist/web-extension-cjs/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  1367. package/dist/web-extension-cjs/src/platform_browser/iframe/iframe.d.ts +18 -0
  1368. package/dist/web-extension-cjs/src/platform_browser/index.d.ts +27 -0
  1369. package/dist/web-extension-cjs/src/platform_browser/load_js.d.ts +29 -0
  1370. package/dist/web-extension-cjs/src/platform_browser/messagechannel/index.d.ts +87 -0
  1371. package/dist/web-extension-cjs/src/platform_browser/messagechannel/promise.d.ts +33 -0
  1372. package/dist/web-extension-cjs/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  1373. package/dist/web-extension-cjs/src/platform_browser/messagechannel/sender.d.ts +46 -0
  1374. package/dist/web-extension-cjs/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  1375. package/dist/web-extension-cjs/src/platform_browser/persistence/browser.d.ts +27 -0
  1376. package/dist/web-extension-cjs/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  1377. package/dist/web-extension-cjs/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  1378. package/dist/web-extension-cjs/src/platform_browser/persistence/local_storage.d.ts +25 -0
  1379. package/dist/web-extension-cjs/src/platform_browser/persistence/session_storage.d.ts +24 -0
  1380. package/dist/web-extension-cjs/src/platform_browser/popup_redirect.d.ts +27 -0
  1381. package/dist/web-extension-cjs/src/platform_browser/providers/phone.d.ts +154 -0
  1382. package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  1383. package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  1384. package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  1385. package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  1386. package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  1387. package/dist/web-extension-cjs/src/platform_browser/strategies/phone.d.ts +116 -0
  1388. package/dist/web-extension-cjs/src/platform_browser/strategies/popup.d.ts +109 -0
  1389. package/dist/web-extension-cjs/src/platform_browser/strategies/redirect.d.ts +176 -0
  1390. package/dist/web-extension-cjs/src/platform_browser/util/popup.d.ts +24 -0
  1391. package/dist/web-extension-cjs/src/platform_browser/util/worker.d.ts +20 -0
  1392. package/dist/web-extension-cjs/src/platform_cordova/plugins.d.ts +42 -0
  1393. package/dist/web-extension-cjs/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  1394. package/dist/web-extension-cjs/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  1395. package/dist/web-extension-cjs/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  1396. package/dist/web-extension-cjs/src/platform_cordova/strategies/redirect.d.ts +20 -0
  1397. package/dist/web-extension-cjs/src/platform_node/index.d.ts +51 -0
  1398. package/dist/web-extension-cjs/src/platform_react_native/persistence/react_native.d.ts +25 -0
  1399. package/dist/web-extension-cjs/test/helpers/api/helper.d.ts +22 -0
  1400. package/dist/web-extension-cjs/test/helpers/delay.d.ts +20 -0
  1401. package/dist/web-extension-cjs/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  1402. package/dist/web-extension-cjs/test/helpers/fake_service_worker.d.ts +22 -0
  1403. package/dist/web-extension-cjs/test/helpers/id_token_response.d.ts +18 -0
  1404. package/dist/web-extension-cjs/test/helpers/iframe_event.d.ts +19 -0
  1405. package/dist/web-extension-cjs/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  1406. package/dist/web-extension-cjs/test/helpers/integration/helpers.d.ts +32 -0
  1407. package/dist/web-extension-cjs/test/helpers/integration/settings.d.ts +23 -0
  1408. package/dist/web-extension-cjs/test/helpers/jwt.d.ts +17 -0
  1409. package/dist/web-extension-cjs/test/helpers/mock_auth.d.ts +47 -0
  1410. package/dist/web-extension-cjs/test/helpers/mock_auth_credential.d.ts +31 -0
  1411. package/dist/web-extension-cjs/test/helpers/mock_fetch.d.ts +31 -0
  1412. package/dist/web-extension-cjs/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  1413. package/dist/web-extension-cjs/test/helpers/redirect_persistence.d.ts +24 -0
  1414. package/dist/web-extension-cjs/test/helpers/timeout_stub.d.ts +34 -0
  1415. package/dist/web-extension-cjs/test/integration/flows/middleware_test_generator.d.ts +18 -0
  1416. package/dist/web-extension-cjs/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  1417. package/dist/web-extension-cjs/test/integration/webdriver/util/functions.d.ts +81 -0
  1418. package/dist/web-extension-cjs/test/integration/webdriver/util/idp_page.d.ts +31 -0
  1419. package/dist/web-extension-cjs/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  1420. package/dist/web-extension-cjs/test/integration/webdriver/util/test_runner.d.ts +19 -0
  1421. package/dist/web-extension-cjs/test/integration/webdriver/util/test_server.d.ts +27 -0
  1422. package/dist/web-extension-cjs/test/integration/webdriver/util/ui_page.d.ts +33 -0
  1423. package/dist/web-extension-esm/auth-web-extension-public.d.ts +3210 -0
  1424. package/dist/web-extension-esm/auth-web-extension.d.ts +3763 -0
  1425. package/dist/web-extension-esm/index.cordova.d.ts +32 -0
  1426. package/dist/web-extension-esm/index.d.ts +38 -0
  1427. package/dist/web-extension-esm/index.doc.d.ts +24 -0
  1428. package/dist/web-extension-esm/index.js +49 -0
  1429. package/dist/web-extension-esm/index.js.map +1 -0
  1430. package/dist/web-extension-esm/index.node.d.ts +17 -0
  1431. package/dist/web-extension-esm/index.rn.d.ts +40 -0
  1432. package/dist/web-extension-esm/index.shared.d.ts +19 -0
  1433. package/dist/web-extension-esm/index.web-extension.d.ts +31 -0
  1434. package/dist/web-extension-esm/index.webworker.d.ts +21 -0
  1435. package/dist/web-extension-esm/internal/index.d.ts +42 -0
  1436. package/dist/web-extension-esm/internal.js +3466 -0
  1437. package/dist/web-extension-esm/internal.js.map +1 -0
  1438. package/dist/web-extension-esm/package.json +1 -0
  1439. package/dist/web-extension-esm/register-7238101c.js +8255 -0
  1440. package/dist/web-extension-esm/register-7238101c.js.map +1 -0
  1441. package/dist/web-extension-esm/scripts/run_node_tests.d.ts +17 -0
  1442. package/dist/web-extension-esm/src/api/account_management/account.d.ts +59 -0
  1443. package/dist/web-extension-esm/src/api/account_management/email_and_password.d.ts +49 -0
  1444. package/dist/web-extension-esm/src/api/account_management/mfa.d.ts +107 -0
  1445. package/dist/web-extension-esm/src/api/account_management/profile.d.ts +29 -0
  1446. package/dist/web-extension-esm/src/api/authentication/create_auth_uri.d.ts +26 -0
  1447. package/dist/web-extension-esm/src/api/authentication/custom_token.d.ts +26 -0
  1448. package/dist/web-extension-esm/src/api/authentication/email_and_password.d.ts +86 -0
  1449. package/dist/web-extension-esm/src/api/authentication/email_link.d.ts +32 -0
  1450. package/dist/web-extension-esm/src/api/authentication/idp.d.ts +40 -0
  1451. package/dist/web-extension-esm/src/api/authentication/mfa.d.ts +73 -0
  1452. package/dist/web-extension-esm/src/api/authentication/recaptcha.d.ts +34 -0
  1453. package/dist/web-extension-esm/src/api/authentication/sign_up.d.ts +34 -0
  1454. package/dist/web-extension-esm/src/api/authentication/sms.d.ts +54 -0
  1455. package/dist/web-extension-esm/src/api/authentication/token.d.ts +37 -0
  1456. package/dist/web-extension-esm/src/api/errors.d.ts +129 -0
  1457. package/dist/web-extension-esm/src/api/index.d.ts +101 -0
  1458. package/dist/web-extension-esm/src/api/password_policy/get_password_policy.d.ts +48 -0
  1459. package/dist/web-extension-esm/src/api/project_config/get_project_config.d.ts +25 -0
  1460. package/dist/web-extension-esm/src/core/action_code_url.d.ts +73 -0
  1461. package/dist/web-extension-esm/src/core/auth/auth_event_manager.d.ts +34 -0
  1462. package/dist/web-extension-esm/src/core/auth/auth_impl.d.ts +133 -0
  1463. package/dist/web-extension-esm/src/core/auth/emulator.d.ts +42 -0
  1464. package/dist/web-extension-esm/src/core/auth/firebase_internal.d.ts +35 -0
  1465. package/dist/web-extension-esm/src/core/auth/initialize.d.ts +46 -0
  1466. package/dist/web-extension-esm/src/core/auth/middleware.d.ts +25 -0
  1467. package/dist/web-extension-esm/src/core/auth/password_policy_impl.d.ts +59 -0
  1468. package/dist/web-extension-esm/src/core/auth/register.d.ts +23 -0
  1469. package/dist/web-extension-esm/src/core/credentials/auth_credential.d.ts +75 -0
  1470. package/dist/web-extension-esm/src/core/credentials/email.d.ts +60 -0
  1471. package/dist/web-extension-esm/src/core/credentials/index.d.ts +23 -0
  1472. package/dist/web-extension-esm/src/core/credentials/oauth.d.ts +81 -0
  1473. package/dist/web-extension-esm/src/core/credentials/phone.d.ts +52 -0
  1474. package/dist/web-extension-esm/src/core/credentials/saml.d.ts +52 -0
  1475. package/dist/web-extension-esm/src/core/errors.d.ts +328 -0
  1476. package/dist/web-extension-esm/src/core/index.d.ts +230 -0
  1477. package/dist/web-extension-esm/src/core/persistence/in_memory.d.ts +35 -0
  1478. package/dist/web-extension-esm/src/core/persistence/index.d.ts +42 -0
  1479. package/dist/web-extension-esm/src/core/persistence/persistence_user_manager.d.ts +45 -0
  1480. package/dist/web-extension-esm/src/core/providers/email.d.ts +83 -0
  1481. package/dist/web-extension-esm/src/core/providers/facebook.d.ts +93 -0
  1482. package/dist/web-extension-esm/src/core/providers/federated.d.ts +64 -0
  1483. package/dist/web-extension-esm/src/core/providers/github.d.ts +89 -0
  1484. package/dist/web-extension-esm/src/core/providers/google.d.ts +96 -0
  1485. package/dist/web-extension-esm/src/core/providers/oauth.d.ts +151 -0
  1486. package/dist/web-extension-esm/src/core/providers/saml.d.ts +62 -0
  1487. package/dist/web-extension-esm/src/core/providers/twitter.d.ts +103 -0
  1488. package/dist/web-extension-esm/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
  1489. package/dist/web-extension-esm/src/core/strategies/action_code_settings.d.ts +19 -0
  1490. package/dist/web-extension-esm/src/core/strategies/anonymous.d.ts +32 -0
  1491. package/dist/web-extension-esm/src/core/strategies/credential.d.ts +64 -0
  1492. package/dist/web-extension-esm/src/core/strategies/custom_token.d.ts +37 -0
  1493. package/dist/web-extension-esm/src/core/strategies/email.d.ts +104 -0
  1494. package/dist/web-extension-esm/src/core/strategies/email_and_password.d.ts +139 -0
  1495. package/dist/web-extension-esm/src/core/strategies/email_link.d.ts +107 -0
  1496. package/dist/web-extension-esm/src/core/strategies/idp.d.ts +32 -0
  1497. package/dist/web-extension-esm/src/core/strategies/redirect.d.ts +36 -0
  1498. package/dist/web-extension-esm/src/core/user/account_info.d.ts +68 -0
  1499. package/dist/web-extension-esm/src/core/user/additional_user_info.d.ts +31 -0
  1500. package/dist/web-extension-esm/src/core/user/id_token_result.d.ts +48 -0
  1501. package/dist/web-extension-esm/src/core/user/invalidation.d.ts +18 -0
  1502. package/dist/web-extension-esm/src/core/user/link_unlink.d.ts +30 -0
  1503. package/dist/web-extension-esm/src/core/user/proactive_refresh.d.ts +34 -0
  1504. package/dist/web-extension-esm/src/core/user/reauthenticate.d.ts +20 -0
  1505. package/dist/web-extension-esm/src/core/user/reload.d.ts +29 -0
  1506. package/dist/web-extension-esm/src/core/user/token_manager.d.ts +50 -0
  1507. package/dist/web-extension-esm/src/core/user/user_credential_impl.d.ts +37 -0
  1508. package/dist/web-extension-esm/src/core/user/user_impl.d.ts +74 -0
  1509. package/dist/web-extension-esm/src/core/user/user_metadata.d.ts +27 -0
  1510. package/dist/web-extension-esm/src/core/util/assert.d.ts +94 -0
  1511. package/dist/web-extension-esm/src/core/util/browser.d.ts +50 -0
  1512. package/dist/web-extension-esm/src/core/util/delay.d.ts +31 -0
  1513. package/dist/web-extension-esm/src/core/util/emulator.d.ts +18 -0
  1514. package/dist/web-extension-esm/src/core/util/event_id.d.ts +17 -0
  1515. package/dist/web-extension-esm/src/core/util/fetch_provider.d.ts +25 -0
  1516. package/dist/web-extension-esm/src/core/util/handler.d.ts +20 -0
  1517. package/dist/web-extension-esm/src/core/util/instantiator.d.ts +28 -0
  1518. package/dist/web-extension-esm/src/core/util/location.d.ts +19 -0
  1519. package/dist/web-extension-esm/src/core/util/log.d.ts +23 -0
  1520. package/dist/web-extension-esm/src/core/util/navigator.d.ts +21 -0
  1521. package/dist/web-extension-esm/src/core/util/providers.d.ts +23 -0
  1522. package/dist/web-extension-esm/src/core/util/resolver.d.ts +25 -0
  1523. package/dist/web-extension-esm/src/core/util/time.d.ts +17 -0
  1524. package/dist/web-extension-esm/src/core/util/validate_origin.d.ts +18 -0
  1525. package/dist/web-extension-esm/src/core/util/version.d.ts +31 -0
  1526. package/dist/web-extension-esm/src/index.d.ts +18 -0
  1527. package/dist/web-extension-esm/src/mfa/assertions/totp.d.ts +124 -0
  1528. package/dist/web-extension-esm/src/mfa/index.d.ts +18 -0
  1529. package/dist/web-extension-esm/src/mfa/mfa_assertion.d.ts +27 -0
  1530. package/dist/web-extension-esm/src/mfa/mfa_error.d.ts +35 -0
  1531. package/dist/web-extension-esm/src/mfa/mfa_info.d.ts +36 -0
  1532. package/dist/web-extension-esm/src/mfa/mfa_resolver.d.ts +41 -0
  1533. package/dist/web-extension-esm/src/mfa/mfa_session.d.ts +39 -0
  1534. package/dist/web-extension-esm/src/mfa/mfa_user.d.ts +38 -0
  1535. package/dist/web-extension-esm/src/model/application_verifier.d.ts +23 -0
  1536. package/dist/web-extension-esm/src/model/auth.d.ts +90 -0
  1537. package/dist/web-extension-esm/src/model/enum_maps.d.ts +98 -0
  1538. package/dist/web-extension-esm/src/model/enums.d.ts +74 -0
  1539. package/dist/web-extension-esm/src/model/id_token.d.ts +87 -0
  1540. package/dist/web-extension-esm/src/model/password_policy.d.ts +111 -0
  1541. package/dist/web-extension-esm/src/model/popup_redirect.d.ts +94 -0
  1542. package/dist/web-extension-esm/src/model/public_types.d.ts +1291 -0
  1543. package/dist/web-extension-esm/src/model/user.d.ts +83 -0
  1544. package/dist/web-extension-esm/src/platform_browser/auth_window.d.ts +37 -0
  1545. package/dist/web-extension-esm/src/platform_browser/iframe/gapi.d.ts +19 -0
  1546. package/dist/web-extension-esm/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
  1547. package/dist/web-extension-esm/src/platform_browser/iframe/iframe.d.ts +18 -0
  1548. package/dist/web-extension-esm/src/platform_browser/index.d.ts +27 -0
  1549. package/dist/web-extension-esm/src/platform_browser/load_js.d.ts +29 -0
  1550. package/dist/web-extension-esm/src/platform_browser/messagechannel/index.d.ts +87 -0
  1551. package/dist/web-extension-esm/src/platform_browser/messagechannel/promise.d.ts +33 -0
  1552. package/dist/web-extension-esm/src/platform_browser/messagechannel/receiver.d.ts +63 -0
  1553. package/dist/web-extension-esm/src/platform_browser/messagechannel/sender.d.ts +46 -0
  1554. package/dist/web-extension-esm/src/platform_browser/mfa/assertions/phone.d.ts +59 -0
  1555. package/dist/web-extension-esm/src/platform_browser/persistence/browser.d.ts +27 -0
  1556. package/dist/web-extension-esm/src/platform_browser/persistence/cookie_storage.d.ts +40 -0
  1557. package/dist/web-extension-esm/src/platform_browser/persistence/indexed_db.d.ts +33 -0
  1558. package/dist/web-extension-esm/src/platform_browser/persistence/local_storage.d.ts +25 -0
  1559. package/dist/web-extension-esm/src/platform_browser/persistence/session_storage.d.ts +24 -0
  1560. package/dist/web-extension-esm/src/platform_browser/popup_redirect.d.ts +27 -0
  1561. package/dist/web-extension-esm/src/platform_browser/providers/phone.d.ts +154 -0
  1562. package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha.d.ts +78 -0
  1563. package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +45 -0
  1564. package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
  1565. package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha_mock.d.ts +66 -0
  1566. package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +92 -0
  1567. package/dist/web-extension-esm/src/platform_browser/strategies/phone.d.ts +116 -0
  1568. package/dist/web-extension-esm/src/platform_browser/strategies/popup.d.ts +109 -0
  1569. package/dist/web-extension-esm/src/platform_browser/strategies/redirect.d.ts +176 -0
  1570. package/dist/web-extension-esm/src/platform_browser/util/popup.d.ts +24 -0
  1571. package/dist/web-extension-esm/src/platform_browser/util/worker.d.ts +20 -0
  1572. package/dist/web-extension-esm/src/platform_cordova/plugins.d.ts +42 -0
  1573. package/dist/web-extension-esm/src/platform_cordova/popup_redirect/events.d.ts +39 -0
  1574. package/dist/web-extension-esm/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
  1575. package/dist/web-extension-esm/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
  1576. package/dist/web-extension-esm/src/platform_cordova/strategies/redirect.d.ts +20 -0
  1577. package/dist/web-extension-esm/src/platform_node/index.d.ts +51 -0
  1578. package/dist/web-extension-esm/src/platform_react_native/persistence/react_native.d.ts +25 -0
  1579. package/dist/web-extension-esm/test/helpers/api/helper.d.ts +22 -0
  1580. package/dist/web-extension-esm/test/helpers/delay.d.ts +20 -0
  1581. package/dist/web-extension-esm/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
  1582. package/dist/web-extension-esm/test/helpers/fake_service_worker.d.ts +22 -0
  1583. package/dist/web-extension-esm/test/helpers/id_token_response.d.ts +18 -0
  1584. package/dist/web-extension-esm/test/helpers/iframe_event.d.ts +19 -0
  1585. package/dist/web-extension-esm/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
  1586. package/dist/web-extension-esm/test/helpers/integration/helpers.d.ts +32 -0
  1587. package/dist/web-extension-esm/test/helpers/integration/settings.d.ts +23 -0
  1588. package/dist/web-extension-esm/test/helpers/jwt.d.ts +17 -0
  1589. package/dist/web-extension-esm/test/helpers/mock_auth.d.ts +47 -0
  1590. package/dist/web-extension-esm/test/helpers/mock_auth_credential.d.ts +31 -0
  1591. package/dist/web-extension-esm/test/helpers/mock_fetch.d.ts +31 -0
  1592. package/dist/web-extension-esm/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
  1593. package/dist/web-extension-esm/test/helpers/redirect_persistence.d.ts +24 -0
  1594. package/dist/web-extension-esm/test/helpers/timeout_stub.d.ts +34 -0
  1595. package/dist/web-extension-esm/test/integration/flows/middleware_test_generator.d.ts +18 -0
  1596. package/dist/web-extension-esm/test/integration/webdriver/util/auth_driver.d.ts +46 -0
  1597. package/dist/web-extension-esm/test/integration/webdriver/util/functions.d.ts +81 -0
  1598. package/dist/web-extension-esm/test/integration/webdriver/util/idp_page.d.ts +31 -0
  1599. package/dist/web-extension-esm/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
  1600. package/dist/web-extension-esm/test/integration/webdriver/util/test_runner.d.ts +19 -0
  1601. package/dist/web-extension-esm/test/integration/webdriver/util/test_server.d.ts +27 -0
  1602. package/dist/web-extension-esm/test/integration/webdriver/util/ui_page.d.ts +33 -0
  1603. package/dist/web-extension-esm/tsdoc-metadata.json +11 -0
  1604. package/internal/package.json +12 -0
  1605. package/package.json +186 -0
  1606. package/web-extension/package.json +8 -0
@@ -0,0 +1,3948 @@
1
+ import { CompleteFn } from '@firebase/util';
2
+ import { ErrorFactory } from '@firebase/util';
3
+ import { ErrorFn } from '@firebase/util';
4
+ import { FirebaseApp } from '@firebase/app';
5
+ import { FirebaseError } from '@firebase/util';
6
+ import { NextFn } from '@firebase/util';
7
+ import { Observer } from '@firebase/util';
8
+ import { Unsubscribe } from '@firebase/util';
9
+
10
+ /**
11
+ * A response from {@link checkActionCode}.
12
+ *
13
+ * @public
14
+ */
15
+ export declare interface ActionCodeInfo {
16
+ /**
17
+ * The data associated with the action code.
18
+ *
19
+ * @remarks
20
+ * For the {@link ActionCodeOperation}.PASSWORD_RESET, {@link ActionCodeOperation}.VERIFY_EMAIL, and
21
+ * {@link ActionCodeOperation}.RECOVER_EMAIL actions, this object contains an email field with the address
22
+ * the email was sent to.
23
+ *
24
+ * For the {@link ActionCodeOperation}.RECOVER_EMAIL action, which allows a user to undo an email address
25
+ * change, this object also contains a `previousEmail` field with the user account's current
26
+ * email address. After the action completes, the user's email address will revert to the value
27
+ * in the `email` field from the value in `previousEmail` field.
28
+ *
29
+ * For the {@link ActionCodeOperation}.VERIFY_AND_CHANGE_EMAIL action, which allows a user to verify the
30
+ * email before updating it, this object contains a `previousEmail` field with the user account's
31
+ * email address before updating. After the action completes, the user's email address will be
32
+ * updated to the value in the `email` field from the value in `previousEmail` field.
33
+ *
34
+ * For the {@link ActionCodeOperation}.REVERT_SECOND_FACTOR_ADDITION action, which allows a user to
35
+ * unenroll a newly added second factor, this object contains a `multiFactorInfo` field with
36
+ * the information about the second factor. For phone second factor, the `multiFactorInfo`
37
+ * is a {@link MultiFactorInfo} object, which contains the phone number.
38
+ */
39
+ data: {
40
+ email?: string | null;
41
+ multiFactorInfo?: MultiFactorInfo | null;
42
+ previousEmail?: string | null;
43
+ };
44
+ /**
45
+ * The type of operation that generated the action code.
46
+ */
47
+ operation: (typeof ActionCodeOperation)[keyof typeof ActionCodeOperation];
48
+ }
49
+
50
+ /**
51
+ * An enumeration of the possible email action types.
52
+ *
53
+ * @public
54
+ */
55
+ export declare const ActionCodeOperation: {
56
+ /** The email link sign-in action. */
57
+ readonly EMAIL_SIGNIN: "EMAIL_SIGNIN";
58
+ /** The password reset action. */
59
+ readonly PASSWORD_RESET: "PASSWORD_RESET";
60
+ /** The email revocation action. */
61
+ readonly RECOVER_EMAIL: "RECOVER_EMAIL";
62
+ /** The revert second factor addition email action. */
63
+ readonly REVERT_SECOND_FACTOR_ADDITION: "REVERT_SECOND_FACTOR_ADDITION";
64
+ /** The revert second factor addition email action. */
65
+ readonly VERIFY_AND_CHANGE_EMAIL: "VERIFY_AND_CHANGE_EMAIL";
66
+ /** The email verification action. */
67
+ readonly VERIFY_EMAIL: "VERIFY_EMAIL";
68
+ };
69
+
70
+ /**
71
+ * An interface that defines the required continue/state URL with optional Android and iOS
72
+ * bundle identifiers.
73
+ *
74
+ * @public
75
+ */
76
+ export declare interface ActionCodeSettings {
77
+ /**
78
+ * Sets the Android package name.
79
+ *
80
+ * @remarks
81
+ * This will try to open the link in an Android app if it is installed.
82
+ */
83
+ android?: {
84
+ installApp?: boolean;
85
+ minimumVersion?: string;
86
+ packageName: string;
87
+ };
88
+ /**
89
+ * When set to true, the action code link will be be sent as a Universal Link or Android App
90
+ * Link and will be opened by the app if installed.
91
+ *
92
+ * @remarks
93
+ * In the false case, the code will be sent to the web widget first and then on continue will
94
+ * redirect to the app if installed.
95
+ *
96
+ * @defaultValue false
97
+ */
98
+ handleCodeInApp?: boolean;
99
+ /**
100
+ * Sets the iOS bundle ID.
101
+ *
102
+ * @remarks
103
+ * This will try to open the link in an iOS app if it is installed.
104
+ */
105
+ iOS?: {
106
+ bundleId: string;
107
+ };
108
+ /**
109
+ * Sets the link continue/state URL.
110
+ *
111
+ * @remarks
112
+ * This has different meanings in different contexts:
113
+ * - When the link is handled in the web action widgets, this is the deep link in the
114
+ * `continueUrl` query parameter.
115
+ * - When the link is handled in the app directly, this is the `continueUrl` query parameter in
116
+ * the deep link of the Dynamic Link or Hosting link.
117
+ */
118
+ url: string;
119
+ /**
120
+ * When multiple custom dynamic link domains are defined for a project, specify which one to use
121
+ * when the link is to be opened via a specified mobile app (for example, `example.page.link`).
122
+ *
123
+ *
124
+ * @defaultValue The first domain is automatically selected.
125
+ *
126
+ * @deprecated Firebase Dynamic Links is deprecated and will be shut down as early as August
127
+ * 2025. Instead, use {@link ActionCodeSettings.linkDomain} to set a custom domain for mobile
128
+ * links. Learn more in the {@link https://firebase.google.com/support/dynamic-links-faq | Dynamic Links deprecation FAQ}.
129
+ */
130
+ dynamicLinkDomain?: string;
131
+ /**
132
+ * The optional custom Firebase Hosting domain to use when the link is to be opened via
133
+ * a specified mobile app. The domain must be configured in Firebase Hosting and owned
134
+ * by the project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`).
135
+ *
136
+ * @defaultValue The default Hosting domain will be used (for example, `example.firebaseapp.com`).
137
+ */
138
+ linkDomain?: string;
139
+ }
140
+
141
+ /**
142
+ * @license
143
+ * Copyright 2020 Google LLC
144
+ *
145
+ * Licensed under the Apache License, Version 2.0 (the "License");
146
+ * you may not use this file except in compliance with the License.
147
+ * You may obtain a copy of the License at
148
+ *
149
+ * http://www.apache.org/licenses/LICENSE-2.0
150
+ *
151
+ * Unless required by applicable law or agreed to in writing, software
152
+ * distributed under the License is distributed on an "AS IS" BASIS,
153
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154
+ * See the License for the specific language governing permissions and
155
+ * limitations under the License.
156
+ */
157
+ /**
158
+ * A utility class to parse email action URLs such as password reset, email verification,
159
+ * email link sign in, etc.
160
+ *
161
+ * @public
162
+ */
163
+ export declare class ActionCodeURL {
164
+ /**
165
+ * The API key of the email action link.
166
+ */
167
+ readonly apiKey: string;
168
+ /**
169
+ * The action code of the email action link.
170
+ */
171
+ readonly code: string;
172
+ /**
173
+ * The continue URL of the email action link. Null if not provided.
174
+ */
175
+ readonly continueUrl: string | null;
176
+ /**
177
+ * The language code of the email action link. Null if not provided.
178
+ */
179
+ readonly languageCode: string | null;
180
+ /**
181
+ * The action performed by the email action link. It returns from one of the types from
182
+ * {@link ActionCodeInfo}
183
+ */
184
+ readonly operation: string;
185
+ /**
186
+ * The tenant ID of the email action link. Null if the email action is from the parent project.
187
+ */
188
+ readonly tenantId: string | null;
189
+ /**
190
+ * @param actionLink - The link from which to extract the URL.
191
+ * @returns The {@link ActionCodeURL} object, or null if the link is invalid.
192
+ *
193
+ * @internal
194
+ */
195
+ constructor(actionLink: string);
196
+ /**
197
+ * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
198
+ * otherwise returns null.
199
+ *
200
+ * @param link - The email action link string.
201
+ * @returns The {@link ActionCodeURL} object, or null if the link is invalid.
202
+ *
203
+ * @public
204
+ */
205
+ static parseLink(link: string): ActionCodeURL | null;
206
+ }
207
+
208
+ /**
209
+ * A structure containing additional user information from a federated identity provider.
210
+ *
211
+ * @public
212
+ */
213
+ export declare interface AdditionalUserInfo {
214
+ /**
215
+ * Whether the user is new (created via sign-up) or existing (authenticated using sign-in).
216
+ */
217
+ readonly isNewUser: boolean;
218
+ /**
219
+ * Map containing IDP-specific user data.
220
+ */
221
+ readonly profile: Record<string, unknown> | null;
222
+ /**
223
+ * Identifier for the provider used to authenticate this user.
224
+ */
225
+ readonly providerId: string | null;
226
+ /**
227
+ * The username if the provider is GitHub or Twitter.
228
+ */
229
+ readonly username?: string | null;
230
+ }
231
+
232
+ declare interface APIUserInfo {
233
+ localId?: string;
234
+ displayName?: string;
235
+ photoUrl?: string;
236
+ email?: string;
237
+ emailVerified?: boolean;
238
+ phoneNumber?: string;
239
+ lastLoginAt?: number;
240
+ createdAt?: number;
241
+ tenantId?: string;
242
+ passwordHash?: string;
243
+ providerUserInfo?: ProviderUserInfo[];
244
+ mfaInfo?: MfaEnrollment[];
245
+ }
246
+
247
+ /**
248
+ * A verifier for domain verification and abuse prevention.
249
+ *
250
+ * @remarks
251
+ * Currently, the only implementation is {@link RecaptchaVerifier}.
252
+ *
253
+ * @public
254
+ */
255
+ export declare interface ApplicationVerifier {
256
+ /**
257
+ * Identifies the type of application verifier (e.g. "recaptcha").
258
+ */
259
+ readonly type: string;
260
+ /**
261
+ * Executes the verification process.
262
+ *
263
+ * @returns A Promise for a token that can be used to assert the validity of a request.
264
+ */
265
+ verify(): Promise<string>;
266
+ }
267
+
268
+ /**
269
+ * Applies a verification code sent to the user by email or other out-of-band mechanism.
270
+ *
271
+ * @param auth - The {@link Auth} instance.
272
+ * @param oobCode - A verification code sent to the user.
273
+ *
274
+ * @public
275
+ */
276
+ export declare function applyActionCode(auth: Auth, oobCode: string): Promise<void>;
277
+
278
+ declare type AppName = string;
279
+
280
+ /**
281
+ * Interface representing Firebase Auth service.
282
+ *
283
+ * @remarks
284
+ * See {@link https://firebase.google.com/docs/auth/ | Firebase Authentication} for a full guide
285
+ * on how to use the Firebase Auth service.
286
+ *
287
+ * @public
288
+ */
289
+ export declare interface Auth {
290
+ /** The {@link @firebase/app#FirebaseApp} associated with the `Auth` service instance. */
291
+ readonly app: FirebaseApp;
292
+ /** The name of the app associated with the `Auth` service instance. */
293
+ readonly name: string;
294
+ /** The {@link Config} used to initialize this instance. */
295
+ readonly config: Config;
296
+ /**
297
+ * Changes the type of persistence on the `Auth` instance.
298
+ *
299
+ * @remarks
300
+ * This will affect the currently saved Auth session and applies this type of persistence for
301
+ * future sign-in requests, including sign-in with redirect requests.
302
+ *
303
+ * This makes it easy for a user signing in to specify whether their session should be
304
+ * remembered or not. It also makes it easier to never persist the Auth state for applications
305
+ * that are shared by other users or have sensitive data.
306
+ *
307
+ * This method does not work in a Node.js environment.
308
+ *
309
+ * @example
310
+ * ```javascript
311
+ * auth.setPersistence(browserSessionPersistence);
312
+ * ```
313
+ *
314
+ * @param persistence - The {@link Persistence} to use.
315
+ */
316
+ setPersistence(persistence: Persistence): Promise<void>;
317
+ /**
318
+ * The {@link Auth} instance's language code.
319
+ *
320
+ * @remarks
321
+ * This is a readable/writable property. When set to null, the default Firebase Console language
322
+ * setting is applied. The language code will propagate to email action templates (password
323
+ * reset, email verification and email change revocation), SMS templates for phone authentication,
324
+ * reCAPTCHA verifier and OAuth popup/redirect operations provided the specified providers support
325
+ * localization with the language code specified.
326
+ */
327
+ languageCode: string | null;
328
+ /**
329
+ * The {@link Auth} instance's tenant ID.
330
+ *
331
+ * @remarks
332
+ * This is a readable/writable property. When you set the tenant ID of an {@link Auth} instance, all
333
+ * future sign-in/sign-up operations will pass this tenant ID and sign in or sign up users to
334
+ * the specified tenant project. When set to null, users are signed in to the parent project.
335
+ *
336
+ * @example
337
+ * ```javascript
338
+ * // Set the tenant ID on Auth instance.
339
+ * auth.tenantId = 'TENANT_PROJECT_ID';
340
+ *
341
+ * // All future sign-in request now include tenant ID.
342
+ * const result = await signInWithEmailAndPassword(auth, email, password);
343
+ * // result.user.tenantId should be 'TENANT_PROJECT_ID'.
344
+ * ```
345
+ *
346
+ * @defaultValue null
347
+ */
348
+ tenantId: string | null;
349
+ /**
350
+ * The {@link Auth} instance's settings.
351
+ *
352
+ * @remarks
353
+ * This is used to edit/read configuration related options such as app verification mode for
354
+ * phone authentication.
355
+ */
356
+ readonly settings: AuthSettings;
357
+ /**
358
+ * Adds an observer for changes to the user's sign-in state.
359
+ *
360
+ * @remarks
361
+ * To keep the old behavior, see {@link Auth.onIdTokenChanged}.
362
+ *
363
+ * @param nextOrObserver - callback triggered on change.
364
+ * @param error - Deprecated. This callback is never triggered. Errors
365
+ * on signing in/out can be caught in promises returned from
366
+ * sign-in/sign-out functions.
367
+ * @param completed - Deprecated. This callback is never triggered.
368
+ */
369
+ onAuthStateChanged(nextOrObserver: NextOrObserver<User | null>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
370
+ /**
371
+ * Adds a blocking callback that runs before an auth state change
372
+ * sets a new user.
373
+ *
374
+ * @param callback - callback triggered before new user value is set.
375
+ * If this throws, it blocks the user from being set.
376
+ * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`
377
+ * callback throws, allowing you to undo any side effects.
378
+ */
379
+ beforeAuthStateChanged(callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
380
+ /**
381
+ * Adds an observer for changes to the signed-in user's ID token.
382
+ *
383
+ * @remarks
384
+ * This includes sign-in, sign-out, and token refresh events.
385
+ *
386
+ * @param nextOrObserver - callback triggered on change.
387
+ * @param error - Deprecated. This callback is never triggered. Errors
388
+ * on signing in/out can be caught in promises returned from
389
+ * sign-in/sign-out functions.
390
+ * @param completed - Deprecated. This callback is never triggered.
391
+ */
392
+ onIdTokenChanged(nextOrObserver: NextOrObserver<User | null>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
393
+ /**
394
+ * returns a promise that resolves immediately when the initial
395
+ * auth state is settled. When the promise resolves, the current user might be a valid user
396
+ * or `null` if the user signed out.
397
+ */
398
+ authStateReady(): Promise<void>;
399
+ /** The currently signed-in user (or null). */
400
+ readonly currentUser: User | null;
401
+ /** The current emulator configuration (or null). */
402
+ readonly emulatorConfig: EmulatorConfig | null;
403
+ /**
404
+ * Asynchronously sets the provided user as {@link Auth.currentUser} on the {@link Auth} instance.
405
+ *
406
+ * @remarks
407
+ * A new instance copy of the user provided will be made and set as currentUser.
408
+ *
409
+ * This will trigger {@link Auth.onAuthStateChanged} and {@link Auth.onIdTokenChanged} listeners
410
+ * like other sign in methods.
411
+ *
412
+ * The operation fails with an error if the user to be updated belongs to a different Firebase
413
+ * project.
414
+ *
415
+ * @param user - The new {@link User}.
416
+ */
417
+ updateCurrentUser(user: User | null): Promise<void>;
418
+ /**
419
+ * Sets the current language to the default device/browser preference.
420
+ */
421
+ useDeviceLanguage(): void;
422
+ /**
423
+ * Signs out the current user. This does not automatically revoke the user's ID token.
424
+ *
425
+ * @remarks
426
+ * This method is not supported by {@link Auth} instances created with a
427
+ * {@link @firebase/app#FirebaseServerApp}.
428
+ */
429
+ signOut(): Promise<void>;
430
+ }
431
+
432
+ /**
433
+ * Interface that represents the credentials returned by an {@link AuthProvider}.
434
+ *
435
+ * @remarks
436
+ * Implementations specify the details about each auth provider's credential requirements.
437
+ *
438
+ * @public
439
+ */
440
+ export declare class AuthCredential {
441
+ /**
442
+ * The authentication provider ID for the credential.
443
+ *
444
+ * @remarks
445
+ * For example, 'facebook.com', or 'google.com'.
446
+ */
447
+ readonly providerId: string;
448
+ /**
449
+ * The authentication sign in method for the credential.
450
+ *
451
+ * @remarks
452
+ * For example, {@link SignInMethod}.EMAIL_PASSWORD, or
453
+ * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method
454
+ * identifier as returned in {@link fetchSignInMethodsForEmail}.
455
+ */
456
+ readonly signInMethod: string;
457
+ /** @internal */
458
+ protected constructor(
459
+ /**
460
+ * The authentication provider ID for the credential.
461
+ *
462
+ * @remarks
463
+ * For example, 'facebook.com', or 'google.com'.
464
+ */
465
+ providerId: string,
466
+ /**
467
+ * The authentication sign in method for the credential.
468
+ *
469
+ * @remarks
470
+ * For example, {@link SignInMethod}.EMAIL_PASSWORD, or
471
+ * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method
472
+ * identifier as returned in {@link fetchSignInMethodsForEmail}.
473
+ */
474
+ signInMethod: string);
475
+ /**
476
+ * Returns a JSON-serializable representation of this object.
477
+ *
478
+ * @returns a JSON-serializable representation of this object.
479
+ */
480
+ toJSON(): object;
481
+ /** @internal */
482
+ _getIdTokenResponse(_auth: AuthInternal): Promise<PhoneOrOauthTokenResponse>;
483
+ /** @internal */
484
+ _linkToIdToken(_auth: AuthInternal, _idToken: string): Promise<IdTokenResponse>;
485
+ /** @internal */
486
+ _getReauthenticationResolver(_auth: AuthInternal): Promise<IdTokenResponse>;
487
+ }
488
+
489
+ /**
490
+ * Interface for an `Auth` error.
491
+ *
492
+ * @public
493
+ */
494
+ export declare interface AuthError extends FirebaseError {
495
+ /** Details about the Firebase Auth error. */
496
+ readonly customData: {
497
+ /** The name of the Firebase App which triggered this error. */
498
+ readonly appName: string;
499
+ /** The email address of the user's account, used for sign-in and linking. */
500
+ readonly email?: string;
501
+ /** The phone number of the user's account, used for sign-in and linking. */
502
+ readonly phoneNumber?: string;
503
+ /**
504
+ * The tenant ID being used for sign-in and linking.
505
+ *
506
+ * @remarks
507
+ * If you use {@link signInWithRedirect} to sign in,
508
+ * you have to set the tenant ID on the {@link Auth} instance again as the tenant ID is not persisted
509
+ * after redirection.
510
+ */
511
+ readonly tenantId?: string;
512
+ };
513
+ }
514
+
515
+ /**
516
+ * Enumeration of Firebase Auth error codes.
517
+ *
518
+ * @internal
519
+ */
520
+ declare const enum AuthErrorCode {
521
+ ADMIN_ONLY_OPERATION = "admin-restricted-operation",
522
+ ARGUMENT_ERROR = "argument-error",
523
+ APP_NOT_AUTHORIZED = "app-not-authorized",
524
+ APP_NOT_INSTALLED = "app-not-installed",
525
+ CAPTCHA_CHECK_FAILED = "captcha-check-failed",
526
+ CODE_EXPIRED = "code-expired",
527
+ CORDOVA_NOT_READY = "cordova-not-ready",
528
+ CORS_UNSUPPORTED = "cors-unsupported",
529
+ CREDENTIAL_ALREADY_IN_USE = "credential-already-in-use",
530
+ CREDENTIAL_MISMATCH = "custom-token-mismatch",
531
+ CREDENTIAL_TOO_OLD_LOGIN_AGAIN = "requires-recent-login",
532
+ DEPENDENT_SDK_INIT_BEFORE_AUTH = "dependent-sdk-initialized-before-auth",
533
+ DYNAMIC_LINK_NOT_ACTIVATED = "dynamic-link-not-activated",
534
+ EMAIL_CHANGE_NEEDS_VERIFICATION = "email-change-needs-verification",
535
+ EMAIL_EXISTS = "email-already-in-use",
536
+ EMULATOR_CONFIG_FAILED = "emulator-config-failed",
537
+ EXPIRED_OOB_CODE = "expired-action-code",
538
+ EXPIRED_POPUP_REQUEST = "cancelled-popup-request",
539
+ INTERNAL_ERROR = "internal-error",
540
+ INVALID_API_KEY = "invalid-api-key",
541
+ INVALID_APP_CREDENTIAL = "invalid-app-credential",
542
+ INVALID_APP_ID = "invalid-app-id",
543
+ INVALID_AUTH = "invalid-user-token",
544
+ INVALID_AUTH_EVENT = "invalid-auth-event",
545
+ INVALID_CERT_HASH = "invalid-cert-hash",
546
+ INVALID_CODE = "invalid-verification-code",
547
+ INVALID_CONTINUE_URI = "invalid-continue-uri",
548
+ INVALID_CORDOVA_CONFIGURATION = "invalid-cordova-configuration",
549
+ INVALID_CUSTOM_TOKEN = "invalid-custom-token",
550
+ INVALID_DYNAMIC_LINK_DOMAIN = "invalid-dynamic-link-domain",
551
+ INVALID_EMAIL = "invalid-email",
552
+ INVALID_EMULATOR_SCHEME = "invalid-emulator-scheme",
553
+ INVALID_CREDENTIAL = "invalid-credential",
554
+ INVALID_MESSAGE_PAYLOAD = "invalid-message-payload",
555
+ INVALID_MFA_SESSION = "invalid-multi-factor-session",
556
+ INVALID_OAUTH_CLIENT_ID = "invalid-oauth-client-id",
557
+ INVALID_OAUTH_PROVIDER = "invalid-oauth-provider",
558
+ INVALID_OOB_CODE = "invalid-action-code",
559
+ INVALID_ORIGIN = "unauthorized-domain",
560
+ INVALID_PASSWORD = "wrong-password",
561
+ INVALID_PERSISTENCE = "invalid-persistence-type",
562
+ INVALID_PHONE_NUMBER = "invalid-phone-number",
563
+ INVALID_PROVIDER_ID = "invalid-provider-id",
564
+ INVALID_RECIPIENT_EMAIL = "invalid-recipient-email",
565
+ INVALID_SENDER = "invalid-sender",
566
+ INVALID_SESSION_INFO = "invalid-verification-id",
567
+ INVALID_TENANT_ID = "invalid-tenant-id",
568
+ LOGIN_BLOCKED = "login-blocked",
569
+ MFA_INFO_NOT_FOUND = "multi-factor-info-not-found",
570
+ MFA_REQUIRED = "multi-factor-auth-required",
571
+ MISSING_ANDROID_PACKAGE_NAME = "missing-android-pkg-name",
572
+ MISSING_APP_CREDENTIAL = "missing-app-credential",
573
+ MISSING_AUTH_DOMAIN = "auth-domain-config-required",
574
+ MISSING_CODE = "missing-verification-code",
575
+ MISSING_CONTINUE_URI = "missing-continue-uri",
576
+ MISSING_IFRAME_START = "missing-iframe-start",
577
+ MISSING_IOS_BUNDLE_ID = "missing-ios-bundle-id",
578
+ MISSING_OR_INVALID_NONCE = "missing-or-invalid-nonce",
579
+ MISSING_MFA_INFO = "missing-multi-factor-info",
580
+ MISSING_MFA_SESSION = "missing-multi-factor-session",
581
+ MISSING_PHONE_NUMBER = "missing-phone-number",
582
+ MISSING_PASSWORD = "missing-password",
583
+ MISSING_SESSION_INFO = "missing-verification-id",
584
+ MODULE_DESTROYED = "app-deleted",
585
+ NEED_CONFIRMATION = "account-exists-with-different-credential",
586
+ NETWORK_REQUEST_FAILED = "network-request-failed",
587
+ NULL_USER = "null-user",
588
+ NO_AUTH_EVENT = "no-auth-event",
589
+ NO_SUCH_PROVIDER = "no-such-provider",
590
+ OPERATION_NOT_ALLOWED = "operation-not-allowed",
591
+ OPERATION_NOT_SUPPORTED = "operation-not-supported-in-this-environment",
592
+ POPUP_BLOCKED = "popup-blocked",
593
+ POPUP_CLOSED_BY_USER = "popup-closed-by-user",
594
+ PROVIDER_ALREADY_LINKED = "provider-already-linked",
595
+ QUOTA_EXCEEDED = "quota-exceeded",
596
+ REDIRECT_CANCELLED_BY_USER = "redirect-cancelled-by-user",
597
+ REDIRECT_OPERATION_PENDING = "redirect-operation-pending",
598
+ REJECTED_CREDENTIAL = "rejected-credential",
599
+ SECOND_FACTOR_ALREADY_ENROLLED = "second-factor-already-in-use",
600
+ SECOND_FACTOR_LIMIT_EXCEEDED = "maximum-second-factor-count-exceeded",
601
+ TENANT_ID_MISMATCH = "tenant-id-mismatch",
602
+ TIMEOUT = "timeout",
603
+ TOKEN_EXPIRED = "user-token-expired",
604
+ TOO_MANY_ATTEMPTS_TRY_LATER = "too-many-requests",
605
+ UNAUTHORIZED_DOMAIN = "unauthorized-continue-uri",
606
+ UNSUPPORTED_FIRST_FACTOR = "unsupported-first-factor",
607
+ UNSUPPORTED_PERSISTENCE = "unsupported-persistence-type",
608
+ UNSUPPORTED_TENANT_OPERATION = "unsupported-tenant-operation",
609
+ UNVERIFIED_EMAIL = "unverified-email",
610
+ USER_CANCELLED = "user-cancelled",
611
+ USER_DELETED = "user-not-found",
612
+ USER_DISABLED = "user-disabled",
613
+ USER_MISMATCH = "user-mismatch",
614
+ USER_SIGNED_OUT = "user-signed-out",
615
+ WEAK_PASSWORD = "weak-password",
616
+ WEB_STORAGE_UNSUPPORTED = "web-storage-unsupported",
617
+ ALREADY_INITIALIZED = "already-initialized",
618
+ RECAPTCHA_NOT_ENABLED = "recaptcha-not-enabled",
619
+ MISSING_RECAPTCHA_TOKEN = "missing-recaptcha-token",
620
+ INVALID_RECAPTCHA_TOKEN = "invalid-recaptcha-token",
621
+ INVALID_RECAPTCHA_ACTION = "invalid-recaptcha-action",
622
+ MISSING_CLIENT_TYPE = "missing-client-type",
623
+ MISSING_RECAPTCHA_VERSION = "missing-recaptcha-version",
624
+ INVALID_RECAPTCHA_VERSION = "invalid-recaptcha-version",
625
+ INVALID_REQ_TYPE = "invalid-req-type",
626
+ UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION = "unsupported-password-policy-schema-version",
627
+ PASSWORD_DOES_NOT_MEET_REQUIREMENTS = "password-does-not-meet-requirements",
628
+ INVALID_HOSTING_LINK_DOMAIN = "invalid-hosting-link-domain"
629
+ }
630
+
631
+ /**
632
+ * A map of potential `Auth` error codes, for easier comparison with errors
633
+ * thrown by the SDK.
634
+ *
635
+ * @remarks
636
+ * Note that you can't tree-shake individual keys
637
+ * in the map, so by using the map you might substantially increase your
638
+ * bundle size.
639
+ *
640
+ * @public
641
+ */
642
+ export declare const AuthErrorCodes: {
643
+ readonly ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation";
644
+ readonly ARGUMENT_ERROR: "auth/argument-error";
645
+ readonly APP_NOT_AUTHORIZED: "auth/app-not-authorized";
646
+ readonly APP_NOT_INSTALLED: "auth/app-not-installed";
647
+ readonly CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed";
648
+ readonly CODE_EXPIRED: "auth/code-expired";
649
+ readonly CORDOVA_NOT_READY: "auth/cordova-not-ready";
650
+ readonly CORS_UNSUPPORTED: "auth/cors-unsupported";
651
+ readonly CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use";
652
+ readonly CREDENTIAL_MISMATCH: "auth/custom-token-mismatch";
653
+ readonly CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login";
654
+ readonly DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth";
655
+ readonly DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated";
656
+ readonly EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification";
657
+ readonly EMAIL_EXISTS: "auth/email-already-in-use";
658
+ readonly EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed";
659
+ readonly EXPIRED_OOB_CODE: "auth/expired-action-code";
660
+ readonly EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request";
661
+ readonly INTERNAL_ERROR: "auth/internal-error";
662
+ readonly INVALID_API_KEY: "auth/invalid-api-key";
663
+ readonly INVALID_APP_CREDENTIAL: "auth/invalid-app-credential";
664
+ readonly INVALID_APP_ID: "auth/invalid-app-id";
665
+ readonly INVALID_AUTH: "auth/invalid-user-token";
666
+ readonly INVALID_AUTH_EVENT: "auth/invalid-auth-event";
667
+ readonly INVALID_CERT_HASH: "auth/invalid-cert-hash";
668
+ readonly INVALID_CODE: "auth/invalid-verification-code";
669
+ readonly INVALID_CONTINUE_URI: "auth/invalid-continue-uri";
670
+ readonly INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration";
671
+ readonly INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token";
672
+ readonly INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain";
673
+ readonly INVALID_EMAIL: "auth/invalid-email";
674
+ readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme";
675
+ readonly INVALID_IDP_RESPONSE: "auth/invalid-credential";
676
+ readonly INVALID_LOGIN_CREDENTIALS: "auth/invalid-credential";
677
+ readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload";
678
+ readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session";
679
+ readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id";
680
+ readonly INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider";
681
+ readonly INVALID_OOB_CODE: "auth/invalid-action-code";
682
+ readonly INVALID_ORIGIN: "auth/unauthorized-domain";
683
+ readonly INVALID_PASSWORD: "auth/wrong-password";
684
+ readonly INVALID_PERSISTENCE: "auth/invalid-persistence-type";
685
+ readonly INVALID_PHONE_NUMBER: "auth/invalid-phone-number";
686
+ readonly INVALID_PROVIDER_ID: "auth/invalid-provider-id";
687
+ readonly INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email";
688
+ readonly INVALID_SENDER: "auth/invalid-sender";
689
+ readonly INVALID_SESSION_INFO: "auth/invalid-verification-id";
690
+ readonly INVALID_TENANT_ID: "auth/invalid-tenant-id";
691
+ readonly MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found";
692
+ readonly MFA_REQUIRED: "auth/multi-factor-auth-required";
693
+ readonly MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name";
694
+ readonly MISSING_APP_CREDENTIAL: "auth/missing-app-credential";
695
+ readonly MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required";
696
+ readonly MISSING_CODE: "auth/missing-verification-code";
697
+ readonly MISSING_CONTINUE_URI: "auth/missing-continue-uri";
698
+ readonly MISSING_IFRAME_START: "auth/missing-iframe-start";
699
+ readonly MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id";
700
+ readonly MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce";
701
+ readonly MISSING_MFA_INFO: "auth/missing-multi-factor-info";
702
+ readonly MISSING_MFA_SESSION: "auth/missing-multi-factor-session";
703
+ readonly MISSING_PHONE_NUMBER: "auth/missing-phone-number";
704
+ readonly MISSING_PASSWORD: "auth/missing-password";
705
+ readonly MISSING_SESSION_INFO: "auth/missing-verification-id";
706
+ readonly MODULE_DESTROYED: "auth/app-deleted";
707
+ readonly NEED_CONFIRMATION: "auth/account-exists-with-different-credential";
708
+ readonly NETWORK_REQUEST_FAILED: "auth/network-request-failed";
709
+ readonly NULL_USER: "auth/null-user";
710
+ readonly NO_AUTH_EVENT: "auth/no-auth-event";
711
+ readonly NO_SUCH_PROVIDER: "auth/no-such-provider";
712
+ readonly OPERATION_NOT_ALLOWED: "auth/operation-not-allowed";
713
+ readonly OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment";
714
+ readonly POPUP_BLOCKED: "auth/popup-blocked";
715
+ readonly POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user";
716
+ readonly PROVIDER_ALREADY_LINKED: "auth/provider-already-linked";
717
+ readonly QUOTA_EXCEEDED: "auth/quota-exceeded";
718
+ readonly REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user";
719
+ readonly REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending";
720
+ readonly REJECTED_CREDENTIAL: "auth/rejected-credential";
721
+ readonly SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use";
722
+ readonly SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded";
723
+ readonly TENANT_ID_MISMATCH: "auth/tenant-id-mismatch";
724
+ readonly TIMEOUT: "auth/timeout";
725
+ readonly TOKEN_EXPIRED: "auth/user-token-expired";
726
+ readonly TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests";
727
+ readonly UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri";
728
+ readonly UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor";
729
+ readonly UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type";
730
+ readonly UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation";
731
+ readonly UNVERIFIED_EMAIL: "auth/unverified-email";
732
+ readonly USER_CANCELLED: "auth/user-cancelled";
733
+ readonly USER_DELETED: "auth/user-not-found";
734
+ readonly USER_DISABLED: "auth/user-disabled";
735
+ readonly USER_MISMATCH: "auth/user-mismatch";
736
+ readonly USER_SIGNED_OUT: "auth/user-signed-out";
737
+ readonly WEAK_PASSWORD: "auth/weak-password";
738
+ readonly WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported";
739
+ readonly ALREADY_INITIALIZED: "auth/already-initialized";
740
+ readonly RECAPTCHA_NOT_ENABLED: "auth/recaptcha-not-enabled";
741
+ readonly MISSING_RECAPTCHA_TOKEN: "auth/missing-recaptcha-token";
742
+ readonly INVALID_RECAPTCHA_TOKEN: "auth/invalid-recaptcha-token";
743
+ readonly INVALID_RECAPTCHA_ACTION: "auth/invalid-recaptcha-action";
744
+ readonly MISSING_CLIENT_TYPE: "auth/missing-client-type";
745
+ readonly MISSING_RECAPTCHA_VERSION: "auth/missing-recaptcha-version";
746
+ readonly INVALID_RECAPTCHA_VERSION: "auth/invalid-recaptcha-version";
747
+ readonly INVALID_REQ_TYPE: "auth/invalid-req-type";
748
+ readonly INVALID_HOSTING_LINK_DOMAIN: "auth/invalid-hosting-link-domain";
749
+ };
750
+
751
+ /**
752
+ * A mapping of error codes to error messages.
753
+ *
754
+ * @remarks
755
+ *
756
+ * While error messages are useful for debugging (providing verbose textual
757
+ * context around what went wrong), these strings take up a lot of space in the
758
+ * compiled code. When deploying code in production, using {@link prodErrorMap}
759
+ * will save you roughly 10k compressed/gzipped over {@link debugErrorMap}. You
760
+ * can select the error map during initialization:
761
+ *
762
+ * ```javascript
763
+ * initializeAuth(app, {errorMap: debugErrorMap})
764
+ * ```
765
+ *
766
+ * When initializing Auth, {@link prodErrorMap} is default.
767
+ *
768
+ * @public
769
+ */
770
+ export declare interface AuthErrorMap {
771
+ }
772
+
773
+ /**
774
+ * @internal
775
+ */
776
+ declare interface AuthErrorParams extends GenericAuthErrorParams {
777
+ [AuthErrorCode.ARGUMENT_ERROR]: {
778
+ appName?: AppName;
779
+ };
780
+ [AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH]: {
781
+ appName?: AppName;
782
+ };
783
+ [AuthErrorCode.INTERNAL_ERROR]: {
784
+ appName?: AppName;
785
+ };
786
+ [AuthErrorCode.LOGIN_BLOCKED]: {
787
+ appName?: AppName;
788
+ originalMessage?: string;
789
+ };
790
+ [AuthErrorCode.OPERATION_NOT_SUPPORTED]: {
791
+ appName?: AppName;
792
+ };
793
+ [AuthErrorCode.NO_AUTH_EVENT]: {
794
+ appName?: AppName;
795
+ };
796
+ [AuthErrorCode.MFA_REQUIRED]: {
797
+ appName: AppName;
798
+ _serverResponse: IdTokenMfaResponse;
799
+ };
800
+ [AuthErrorCode.INVALID_CORDOVA_CONFIGURATION]: {
801
+ appName: AppName;
802
+ missingPlugin?: string;
803
+ };
804
+ }
805
+
806
+ /**
807
+ * @internal
808
+ */
809
+ declare interface AuthEvent {
810
+ type: AuthEventType;
811
+ eventId: string | null;
812
+ urlResponse: string | null;
813
+ sessionId: string | null;
814
+ postBody: string | null;
815
+ tenantId: string | null;
816
+ error?: AuthEventError;
817
+ }
818
+
819
+ /**
820
+ * @internal
821
+ */
822
+ declare interface AuthEventConsumer {
823
+ readonly filter: AuthEventType[];
824
+ eventId: string | null;
825
+ onAuthEvent(event: AuthEvent): unknown;
826
+ onError(error: FirebaseError): unknown;
827
+ }
828
+
829
+ declare interface AuthEventError extends Error {
830
+ code: string;
831
+ message: string;
832
+ }
833
+
834
+ /**
835
+ * @internal
836
+ */
837
+ declare const enum AuthEventType {
838
+ LINK_VIA_POPUP = "linkViaPopup",
839
+ LINK_VIA_REDIRECT = "linkViaRedirect",
840
+ REAUTH_VIA_POPUP = "reauthViaPopup",
841
+ REAUTH_VIA_REDIRECT = "reauthViaRedirect",
842
+ SIGN_IN_VIA_POPUP = "signInViaPopup",
843
+ SIGN_IN_VIA_REDIRECT = "signInViaRedirect",
844
+ UNKNOWN = "unknown",
845
+ VERIFY_APP = "verifyApp"
846
+ }
847
+
848
+ /**
849
+ * UserInternal and AuthInternal reference each other, so both of them are included in the public typings.
850
+ * In order to exclude them, we mark them as internal explicitly.
851
+ *
852
+ * @internal
853
+ */
854
+ declare interface AuthInternal extends Auth {
855
+ currentUser: User | null;
856
+ emulatorConfig: EmulatorConfig | null;
857
+ _agentRecaptchaConfig: RecaptchaConfig | null;
858
+ _tenantRecaptchaConfigs: Record<string, RecaptchaConfig>;
859
+ _projectPasswordPolicy: PasswordPolicy | null;
860
+ _tenantPasswordPolicies: Record<string, PasswordPolicy>;
861
+ _canInitEmulator: boolean;
862
+ _isInitialized: boolean;
863
+ _initializationPromise: Promise<void> | null;
864
+ _persistenceManagerAvailable: Promise<void>;
865
+ _updateCurrentUser(user: UserInternal | null): Promise<void>;
866
+ _onStorageEvent(): void;
867
+ _notifyListenersIfCurrent(user: UserInternal): void;
868
+ _persistUserIfCurrent(user: UserInternal): Promise<void>;
869
+ _setRedirectUser(user: UserInternal | null, popupRedirectResolver?: PopupRedirectResolver): Promise<void>;
870
+ _redirectUserForId(id: string): Promise<UserInternal | null>;
871
+ _popupRedirectResolver: PopupRedirectResolverInternal | null;
872
+ _key(): string;
873
+ _startProactiveRefresh(): void;
874
+ _stopProactiveRefresh(): void;
875
+ _getPersistenceType(): string;
876
+ _getPersistence(): PersistenceInternal;
877
+ _getRecaptchaConfig(): RecaptchaConfig | null;
878
+ _getPasswordPolicyInternal(): PasswordPolicyInternal | null;
879
+ _updatePasswordPolicy(): Promise<void>;
880
+ _logFramework(framework: string): void;
881
+ _getFrameworks(): readonly string[];
882
+ _getAdditionalHeaders(): Promise<Record<string, string>>;
883
+ _getAppCheckToken(): Promise<string | undefined>;
884
+ readonly name: AppName;
885
+ readonly config: ConfigInternal;
886
+ languageCode: string | null;
887
+ tenantId: string | null;
888
+ readonly settings: AuthSettings;
889
+ _errorFactory: ErrorFactory<AuthErrorCode, AuthErrorParams>;
890
+ useDeviceLanguage(): void;
891
+ signOut(): Promise<void>;
892
+ validatePassword(password: string): Promise<PasswordValidationStatus>;
893
+ revokeAccessToken(token: string): Promise<void>;
894
+ }
895
+
896
+ declare class AuthPopup {
897
+ readonly window: Window | null;
898
+ associatedEvent: string | null;
899
+ constructor(window: Window | null);
900
+ close(): void;
901
+ }
902
+
903
+ /**
904
+ * Interface that represents an auth provider, used to facilitate creating {@link AuthCredential}.
905
+ *
906
+ * @public
907
+ */
908
+ export declare interface AuthProvider {
909
+ /**
910
+ * Provider for which credentials can be constructed.
911
+ */
912
+ readonly providerId: string;
913
+ }
914
+
915
+ /**
916
+ * Interface representing an {@link Auth} instance's settings.
917
+ *
918
+ * @remarks Currently used for enabling/disabling app verification for phone Auth testing.
919
+ *
920
+ * @public
921
+ */
922
+ export declare interface AuthSettings {
923
+ /**
924
+ * When set, this property disables app verification for the purpose of testing phone
925
+ * authentication. For this property to take effect, it needs to be set before rendering a
926
+ * reCAPTCHA app verifier. When this is disabled, a mock reCAPTCHA is rendered instead. This is
927
+ * useful for manual testing during development or for automated integration tests.
928
+ *
929
+ * In order to use this feature, you will need to
930
+ * {@link https://firebase.google.com/docs/auth/web/phone-auth#test-with-whitelisted-phone-numbers | whitelist your phone number}
931
+ * via the Firebase Console.
932
+ *
933
+ * The default value is false (app verification is enabled).
934
+ */
935
+ appVerificationDisabledForTesting: boolean;
936
+ }
937
+
938
+ /**
939
+ * MFA Info as returned by the API.
940
+ */
941
+ declare interface BaseMfaEnrollment {
942
+ mfaEnrollmentId: string;
943
+ enrolledAt: number;
944
+ displayName?: string;
945
+ }
946
+
947
+ /**
948
+ * Common code to all OAuth providers. This is separate from the
949
+ * {@link OAuthProvider} so that child providers (like
950
+ * {@link GoogleAuthProvider}) don't inherit the `credential` instance method.
951
+ * Instead, they rely on a static `credential` method.
952
+ */
953
+ declare abstract class BaseOAuthProvider extends FederatedAuthProvider implements AuthProvider {
954
+ /** @internal */
955
+ private scopes;
956
+ /**
957
+ * Add an OAuth scope to the credential.
958
+ *
959
+ * @param scope - Provider OAuth scope to add.
960
+ */
961
+ addScope(scope: string): AuthProvider;
962
+ /**
963
+ * Retrieve the current list of OAuth scopes.
964
+ */
965
+ getScopes(): string[];
966
+ }
967
+
968
+ /**
969
+ * Adds a blocking callback that runs before an auth state change
970
+ * sets a new user.
971
+ *
972
+ * @param auth - The {@link Auth} instance.
973
+ * @param callback - callback triggered before new user value is set.
974
+ * If this throws, it blocks the user from being set.
975
+ * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`
976
+ * callback throws, allowing you to undo any side effects.
977
+ */
978
+ export declare function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
979
+
980
+ /**
981
+ * An implementation of {@link Persistence} of type `LOCAL` using `localStorage`
982
+ * for the underlying storage.
983
+ *
984
+ * @public
985
+ */
986
+ export declare const browserLocalPersistence: Persistence;
987
+
988
+ /**
989
+ * An implementation of {@link Persistence} of `SESSION` using `sessionStorage`
990
+ * for the underlying storage.
991
+ *
992
+ * @public
993
+ */
994
+ export declare const browserSessionPersistence: Persistence;
995
+
996
+ /**
997
+ * Checks a verification code sent to the user by email or other out-of-band mechanism.
998
+ *
999
+ * @returns metadata about the code.
1000
+ *
1001
+ * @param auth - The {@link Auth} instance.
1002
+ * @param oobCode - A verification code sent to the user.
1003
+ *
1004
+ * @public
1005
+ */
1006
+ export declare function checkActionCode(auth: Auth, oobCode: string): Promise<ActionCodeInfo>;
1007
+
1008
+ /**
1009
+ * @internal
1010
+ */
1011
+ declare const enum ClientPlatform {
1012
+ BROWSER = "Browser",
1013
+ NODE = "Node",
1014
+ REACT_NATIVE = "ReactNative",
1015
+ CORDOVA = "Cordova",
1016
+ WORKER = "Worker",
1017
+ WEB_EXTENSION = "WebExtension"
1018
+ }
1019
+ export { CompleteFn }
1020
+
1021
+ /**
1022
+ * Interface representing the `Auth` config.
1023
+ *
1024
+ * @public
1025
+ */
1026
+ export declare interface Config {
1027
+ /**
1028
+ * The API Key used to communicate with the Firebase Auth backend.
1029
+ */
1030
+ apiKey: string;
1031
+ /**
1032
+ * The host at which the Firebase Auth backend is running.
1033
+ */
1034
+ apiHost: string;
1035
+ /**
1036
+ * The scheme used to communicate with the Firebase Auth backend.
1037
+ */
1038
+ apiScheme: string;
1039
+ /**
1040
+ * The host at which the Secure Token API is running.
1041
+ */
1042
+ tokenApiHost: string;
1043
+ /**
1044
+ * The SDK Client Version.
1045
+ */
1046
+ sdkClientVersion: string;
1047
+ /**
1048
+ * The domain at which the web widgets are hosted (provided via Firebase Config).
1049
+ */
1050
+ authDomain?: string;
1051
+ }
1052
+
1053
+ /**
1054
+ * @internal
1055
+ */
1056
+ declare interface ConfigInternal extends Config {
1057
+ /**
1058
+ * @readonly
1059
+ */
1060
+ emulator?: {
1061
+ url: string;
1062
+ };
1063
+ /**
1064
+ * @readonly
1065
+ */
1066
+ clientPlatform: ClientPlatform;
1067
+ }
1068
+
1069
+ /**
1070
+ * A result from a phone number sign-in, link, or reauthenticate call.
1071
+ *
1072
+ * @public
1073
+ */
1074
+ export declare interface ConfirmationResult {
1075
+ /**
1076
+ * The phone number authentication operation's verification ID.
1077
+ *
1078
+ * @remarks
1079
+ * This can be used along with the verification code to initialize a
1080
+ * {@link PhoneAuthCredential}.
1081
+ */
1082
+ readonly verificationId: string;
1083
+ /**
1084
+ * Finishes a phone number sign-in, link, or reauthentication.
1085
+ *
1086
+ * @example
1087
+ * ```javascript
1088
+ * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
1089
+ * // Obtain verificationCode from the user.
1090
+ * const userCredential = await confirmationResult.confirm(verificationCode);
1091
+ * ```
1092
+ *
1093
+ * @param verificationCode - The code that was sent to the user's mobile device.
1094
+ */
1095
+ confirm(verificationCode: string): Promise<UserCredential>;
1096
+ }
1097
+
1098
+ /**
1099
+ * Completes the password reset process, given a confirmation code and new password.
1100
+ *
1101
+ * @param auth - The {@link Auth} instance.
1102
+ * @param oobCode - A confirmation code sent to the user.
1103
+ * @param newPassword - The new password.
1104
+ *
1105
+ * @public
1106
+ */
1107
+ export declare function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise<void>;
1108
+
1109
+ /**
1110
+ * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production
1111
+ * Firebase Auth services.
1112
+ *
1113
+ * @remarks
1114
+ * This must be called synchronously immediately following the first call to
1115
+ * {@link initializeAuth}. Do not use with production credentials as emulator
1116
+ * traffic is not encrypted.
1117
+ *
1118
+ *
1119
+ * @example
1120
+ * ```javascript
1121
+ * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });
1122
+ * ```
1123
+ *
1124
+ * @param auth - The {@link Auth} instance.
1125
+ * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').
1126
+ * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to
1127
+ * `true` to disable the warning banner attached to the DOM.
1128
+ *
1129
+ * @public
1130
+ */
1131
+ export declare function connectAuthEmulator(auth: Auth, url: string, options?: {
1132
+ disableWarnings: boolean;
1133
+ }): void;
1134
+
1135
+ /**
1136
+ * An implementation of {@link PopupRedirectResolver} suitable for Cordova
1137
+ * based applications.
1138
+ *
1139
+ * @public
1140
+ */
1141
+ export declare const cordovaPopupRedirectResolver: PopupRedirectResolver;
1142
+
1143
+ /**
1144
+ * Creates a new user account associated with the specified email address and password.
1145
+ *
1146
+ * @remarks
1147
+ * On successful creation of the user account, this user will also be signed in to your application.
1148
+ *
1149
+ * User account creation can fail if the account already exists or the password is invalid.
1150
+ *
1151
+ * This method is not supported on {@link Auth} instances created with a
1152
+ * {@link @firebase/app#FirebaseServerApp}.
1153
+ *
1154
+ * Note: The email address acts as a unique identifier for the user and enables an email-based
1155
+ * password reset. This function will create a new user account and set the initial user password.
1156
+ *
1157
+ * @param auth - The {@link Auth} instance.
1158
+ * @param email - The user's email address.
1159
+ * @param password - The user's chosen password.
1160
+ *
1161
+ * @public
1162
+ */
1163
+ export declare function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
1164
+
1165
+ /**
1166
+ * Map of OAuth Custom Parameters.
1167
+ *
1168
+ * @public
1169
+ */
1170
+ export declare type CustomParameters = Record<string, string>;
1171
+
1172
+ /**
1173
+ * A verbose error map with detailed descriptions for most error codes.
1174
+ *
1175
+ * See discussion at {@link AuthErrorMap}
1176
+ *
1177
+ * @public
1178
+ */
1179
+ export declare const debugErrorMap: AuthErrorMap;
1180
+
1181
+ /**
1182
+ * Deletes and signs out the user.
1183
+ *
1184
+ * @remarks
1185
+ * Important: this is a security-sensitive operation that requires the user to have recently
1186
+ * signed in. If this requirement isn't met, ask the user to authenticate again and then call
1187
+ * {@link reauthenticateWithCredential}.
1188
+ *
1189
+ * @param user - The user.
1190
+ *
1191
+ * @public
1192
+ */
1193
+ export declare function deleteUser(user: User): Promise<void>;
1194
+
1195
+ /**
1196
+ * The dependencies that can be used to initialize an {@link Auth} instance.
1197
+ *
1198
+ * @remarks
1199
+ *
1200
+ * The modular SDK enables tree shaking by allowing explicit declarations of
1201
+ * dependencies. For example, a web app does not need to include code that
1202
+ * enables Cordova redirect sign in. That functionality is therefore split into
1203
+ * {@link browserPopupRedirectResolver} and
1204
+ * {@link cordovaPopupRedirectResolver}. The dependencies object is how Auth is
1205
+ * configured to reduce bundle sizes.
1206
+ *
1207
+ * There are two ways to initialize an {@link Auth} instance: {@link getAuth} and
1208
+ * {@link initializeAuth}. `getAuth` initializes everything using
1209
+ * platform-specific configurations, while `initializeAuth` takes a
1210
+ * `Dependencies` object directly, giving you more control over what is used.
1211
+ *
1212
+ * @public
1213
+ */
1214
+ export declare interface Dependencies {
1215
+ /**
1216
+ * Which {@link Persistence} to use. If this is an array, the first
1217
+ * `Persistence` that the device supports is used. The SDK searches for an
1218
+ * existing account in order and, if one is found in a secondary
1219
+ * `Persistence`, the account is moved to the primary `Persistence`.
1220
+ *
1221
+ * If no persistence is provided, the SDK falls back on
1222
+ * {@link inMemoryPersistence}.
1223
+ */
1224
+ persistence?: Persistence | Persistence[];
1225
+ /**
1226
+ * The {@link PopupRedirectResolver} to use. This value depends on the
1227
+ * platform. Options are {@link browserPopupRedirectResolver} and
1228
+ * {@link cordovaPopupRedirectResolver}. This field is optional if neither
1229
+ * {@link signInWithPopup} or {@link signInWithRedirect} are being used.
1230
+ */
1231
+ popupRedirectResolver?: PopupRedirectResolver;
1232
+ /**
1233
+ * Which {@link AuthErrorMap} to use.
1234
+ */
1235
+ errorMap?: AuthErrorMap;
1236
+ }
1237
+
1238
+ /**
1239
+ * Interface that represents the credentials returned by {@link EmailAuthProvider} for
1240
+ * {@link ProviderId}.PASSWORD
1241
+ *
1242
+ * @remarks
1243
+ * Covers both {@link SignInMethod}.EMAIL_PASSWORD and
1244
+ * {@link SignInMethod}.EMAIL_LINK.
1245
+ *
1246
+ * @public
1247
+ */
1248
+ export declare class EmailAuthCredential extends AuthCredential {
1249
+ /** @internal */
1250
+ readonly _email: string;
1251
+ /** @internal */
1252
+ readonly _password: string;
1253
+ /** @internal */
1254
+ readonly _tenantId: string | null;
1255
+ /** @internal */
1256
+ private constructor();
1257
+ /** @internal */
1258
+ static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential;
1259
+ /** @internal */
1260
+ static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential;
1261
+ /** {@inheritdoc AuthCredential.toJSON} */
1262
+ toJSON(): object;
1263
+ /**
1264
+ * Static method to deserialize a JSON representation of an object into an {@link AuthCredential}.
1265
+ *
1266
+ * @param json - Either `object` or the stringified representation of the object. When string is
1267
+ * provided, `JSON.parse` would be called first.
1268
+ *
1269
+ * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
1270
+ */
1271
+ static fromJSON(json: object | string): EmailAuthCredential | null;
1272
+ /** @internal */
1273
+ _getIdTokenResponse(auth: AuthInternal): Promise<IdTokenResponse>;
1274
+ /** @internal */
1275
+ _linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
1276
+ /** @internal */
1277
+ _getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
1278
+ }
1279
+
1280
+ /**
1281
+ * Provider for generating {@link EmailAuthCredential}.
1282
+ *
1283
+ * @public
1284
+ */
1285
+ export declare class EmailAuthProvider implements AuthProvider {
1286
+ /**
1287
+ * Always set to {@link ProviderId}.PASSWORD, even for email link.
1288
+ */
1289
+ static readonly PROVIDER_ID: 'password';
1290
+ /**
1291
+ * Always set to {@link SignInMethod}.EMAIL_PASSWORD.
1292
+ */
1293
+ static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password';
1294
+ /**
1295
+ * Always set to {@link SignInMethod}.EMAIL_LINK.
1296
+ */
1297
+ static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink';
1298
+ /**
1299
+ * Always set to {@link ProviderId}.PASSWORD, even for email link.
1300
+ */
1301
+ readonly providerId: "password";
1302
+ /**
1303
+ * Initialize an {@link AuthCredential} using an email and password.
1304
+ *
1305
+ * @example
1306
+ * ```javascript
1307
+ * const authCredential = EmailAuthProvider.credential(email, password);
1308
+ * const userCredential = await signInWithCredential(auth, authCredential);
1309
+ * ```
1310
+ *
1311
+ * @example
1312
+ * ```javascript
1313
+ * const userCredential = await signInWithEmailAndPassword(auth, email, password);
1314
+ * ```
1315
+ *
1316
+ * @param email - Email address.
1317
+ * @param password - User account password.
1318
+ * @returns The auth provider credential.
1319
+ */
1320
+ static credential(email: string, password: string): EmailAuthCredential;
1321
+ /**
1322
+ * Initialize an {@link AuthCredential} using an email and an email link after a sign in with
1323
+ * email link operation.
1324
+ *
1325
+ * @example
1326
+ * ```javascript
1327
+ * const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);
1328
+ * const userCredential = await signInWithCredential(auth, authCredential);
1329
+ * ```
1330
+ *
1331
+ * @example
1332
+ * ```javascript
1333
+ * await sendSignInLinkToEmail(auth, email);
1334
+ * // Obtain emailLink from user.
1335
+ * const userCredential = await signInWithEmailLink(auth, email, emailLink);
1336
+ * ```
1337
+ *
1338
+ * @param auth - The {@link Auth} instance used to verify the link.
1339
+ * @param email - Email address.
1340
+ * @param emailLink - Sign-in email link.
1341
+ * @returns - The auth provider credential.
1342
+ */
1343
+ static credentialWithLink(email: string, emailLink: string): EmailAuthCredential;
1344
+ }
1345
+
1346
+ /**
1347
+ * Configuration of Firebase Authentication Emulator.
1348
+ * @public
1349
+ */
1350
+ export declare interface EmulatorConfig {
1351
+ /**
1352
+ * The protocol used to communicate with the emulator ("http"/"https").
1353
+ */
1354
+ readonly protocol: string;
1355
+ /**
1356
+ * The hostname of the emulator, which may be a domain ("localhost"), IPv4 address ("127.0.0.1")
1357
+ * or quoted IPv6 address ("[::1]").
1358
+ */
1359
+ readonly host: string;
1360
+ /**
1361
+ * The port of the emulator, or null if port isn't specified (i.e. protocol default).
1362
+ */
1363
+ readonly port: number | null;
1364
+ /**
1365
+ * The emulator-specific options.
1366
+ */
1367
+ readonly options: {
1368
+ /**
1369
+ * Whether the warning banner attached to the DOM was disabled.
1370
+ */
1371
+ readonly disableWarnings: boolean;
1372
+ };
1373
+ }
1374
+
1375
+ declare const enum EnforcementState {
1376
+ ENFORCE = "ENFORCE",
1377
+ AUDIT = "AUDIT",
1378
+ OFF = "OFF",
1379
+ ENFORCEMENT_STATE_UNSPECIFIED = "ENFORCEMENT_STATE_UNSPECIFIED"
1380
+ }
1381
+ export { ErrorFn }
1382
+
1383
+ /**
1384
+ * @internal
1385
+ */
1386
+ declare interface EventManager {
1387
+ registerConsumer(authEventConsumer: AuthEventConsumer): void;
1388
+ unregisterConsumer(authEventConsumer: AuthEventConsumer): void;
1389
+ }
1390
+
1391
+ /**
1392
+ * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.FACEBOOK.
1393
+ *
1394
+ * @example
1395
+ * ```javascript
1396
+ * // Sign in using a redirect.
1397
+ * const provider = new FacebookAuthProvider();
1398
+ * // Start a sign in process for an unauthenticated user.
1399
+ * provider.addScope('user_birthday');
1400
+ * await signInWithRedirect(auth, provider);
1401
+ * // This will trigger a full page redirect away from your app
1402
+ *
1403
+ * // After returning from the redirect when your app initializes you can obtain the result
1404
+ * const result = await getRedirectResult(auth);
1405
+ * if (result) {
1406
+ * // This is the signed-in user
1407
+ * const user = result.user;
1408
+ * // This gives you a Facebook Access Token.
1409
+ * const credential = FacebookAuthProvider.credentialFromResult(result);
1410
+ * const token = credential.accessToken;
1411
+ * }
1412
+ * ```
1413
+ *
1414
+ * @example
1415
+ * ```javascript
1416
+ * // Sign in using a popup.
1417
+ * const provider = new FacebookAuthProvider();
1418
+ * provider.addScope('user_birthday');
1419
+ * const result = await signInWithPopup(auth, provider);
1420
+ *
1421
+ * // The signed-in user info.
1422
+ * const user = result.user;
1423
+ * // This gives you a Facebook Access Token.
1424
+ * const credential = FacebookAuthProvider.credentialFromResult(result);
1425
+ * const token = credential.accessToken;
1426
+ * ```
1427
+ *
1428
+ * @public
1429
+ */
1430
+ export declare class FacebookAuthProvider extends BaseOAuthProvider {
1431
+ /** Always set to {@link SignInMethod}.FACEBOOK. */
1432
+ static readonly FACEBOOK_SIGN_IN_METHOD: 'facebook.com';
1433
+ /** Always set to {@link ProviderId}.FACEBOOK. */
1434
+ static readonly PROVIDER_ID: 'facebook.com';
1435
+ constructor();
1436
+ /**
1437
+ * Creates a credential for Facebook.
1438
+ *
1439
+ * @example
1440
+ * ```javascript
1441
+ * // `event` from the Facebook auth.authResponseChange callback.
1442
+ * const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);
1443
+ * const result = await signInWithCredential(credential);
1444
+ * ```
1445
+ *
1446
+ * @param accessToken - Facebook access token.
1447
+ */
1448
+ static credential(accessToken: string): OAuthCredential;
1449
+ /**
1450
+ * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
1451
+ *
1452
+ * @param userCredential - The user credential.
1453
+ */
1454
+ static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
1455
+ /**
1456
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
1457
+ * thrown during a sign-in, link, or reauthenticate operation.
1458
+ *
1459
+ * @param userCredential - The user credential.
1460
+ */
1461
+ static credentialFromError(error: FirebaseError): OAuthCredential | null;
1462
+ private static credentialFromTaggedObject;
1463
+ }
1464
+
1465
+ /**
1466
+ * An enum of factors that may be used for multifactor authentication.
1467
+ *
1468
+ * @public
1469
+ */
1470
+ export declare const FactorId: {
1471
+ /** Phone as second factor */
1472
+ readonly PHONE: "phone";
1473
+ readonly TOTP: "totp";
1474
+ };
1475
+
1476
+ /**
1477
+ * The base class for all Federated providers (OAuth (including OIDC), SAML).
1478
+ *
1479
+ * This class is not meant to be instantiated directly.
1480
+ *
1481
+ * @public
1482
+ */
1483
+ declare abstract class FederatedAuthProvider implements AuthProvider {
1484
+ readonly providerId: string;
1485
+ /** @internal */
1486
+ defaultLanguageCode: string | null;
1487
+ /** @internal */
1488
+ private customParameters;
1489
+ /**
1490
+ * Constructor for generic OAuth providers.
1491
+ *
1492
+ * @param providerId - Provider for which credentials should be generated.
1493
+ */
1494
+ constructor(providerId: string);
1495
+ /**
1496
+ * Set the language gode.
1497
+ *
1498
+ * @param languageCode - language code
1499
+ */
1500
+ setDefaultLanguage(languageCode: string | null): void;
1501
+ /**
1502
+ * Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect sign-in
1503
+ * operations.
1504
+ *
1505
+ * @remarks
1506
+ * For a detailed list, check the reserved required OAuth 2.0 parameters such as `client_id`,
1507
+ * `redirect_uri`, `scope`, `response_type`, and `state` are not allowed and will be ignored.
1508
+ *
1509
+ * @param customOAuthParameters - The custom OAuth parameters to pass in the OAuth request.
1510
+ */
1511
+ setCustomParameters(customOAuthParameters: CustomParameters): AuthProvider;
1512
+ /**
1513
+ * Retrieve the current list of {@link CustomParameters}.
1514
+ */
1515
+ getCustomParameters(): CustomParameters;
1516
+ }
1517
+
1518
+ /**
1519
+ * Gets the list of possible sign in methods for the given email address. This method returns an
1520
+ * empty list when
1521
+ * {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}
1522
+ * is enabled, irrespective of the number of authentication methods available for the given email.
1523
+ *
1524
+ * @remarks
1525
+ * This is useful to differentiate methods of sign-in for the same provider, eg.
1526
+ * {@link EmailAuthProvider} which has 2 methods of sign-in,
1527
+ * {@link SignInMethod}.EMAIL_PASSWORD and
1528
+ * {@link SignInMethod}.EMAIL_LINK.
1529
+ *
1530
+ * @param auth - The {@link Auth} instance.
1531
+ * @param email - The user's email address.
1532
+ *
1533
+ * Deprecated. Migrating off of this method is recommended as a security best-practice.
1534
+ * Learn more in the Identity Platform documentation for
1535
+ * {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}.
1536
+ * @public
1537
+ */
1538
+ export declare function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise<string[]>;
1539
+
1540
+ declare interface FinalizeMfaResponse {
1541
+ idToken: string;
1542
+ refreshToken: string;
1543
+ }
1544
+
1545
+ /**
1546
+ * @internal
1547
+ */
1548
+ declare type GenericAuthErrorParams = {
1549
+ [key in Exclude<AuthErrorCode, AuthErrorCode.ARGUMENT_ERROR | AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH | AuthErrorCode.INTERNAL_ERROR | AuthErrorCode.MFA_REQUIRED | AuthErrorCode.NO_AUTH_EVENT | AuthErrorCode.OPERATION_NOT_SUPPORTED>]: {
1550
+ appName?: AppName;
1551
+ email?: string;
1552
+ phoneNumber?: string;
1553
+ message?: string;
1554
+ };
1555
+ };
1556
+
1557
+ /**
1558
+ * Extracts provider specific {@link AdditionalUserInfo} for the given credential.
1559
+ *
1560
+ * @param userCredential - The user credential.
1561
+ *
1562
+ * @public
1563
+ */
1564
+ export declare function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null;
1565
+
1566
+ export declare function getAuth(app?: FirebaseApp): Auth;
1567
+
1568
+ /**
1569
+ * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.
1570
+ *
1571
+ * @remarks
1572
+ * Returns the current token if it has not expired or if it will not expire in the next five
1573
+ * minutes. Otherwise, this will refresh the token and return a new one.
1574
+ *
1575
+ * @param user - The user.
1576
+ * @param forceRefresh - Force refresh regardless of token expiration.
1577
+ *
1578
+ * @public
1579
+ */
1580
+ export declare function getIdToken(user: User, forceRefresh?: boolean): Promise<string>;
1581
+
1582
+ /**
1583
+ * Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service.
1584
+ *
1585
+ * @remarks
1586
+ * Returns the current token if it has not expired or if it will not expire in the next five
1587
+ * minutes. Otherwise, this will refresh the token and return a new one.
1588
+ *
1589
+ * @param user - The user.
1590
+ * @param forceRefresh - Force refresh regardless of token expiration.
1591
+ *
1592
+ * @public
1593
+ */
1594
+ export declare function getIdTokenResult(user: User, forceRefresh?: boolean): Promise<IdTokenResult>;
1595
+
1596
+ /**
1597
+ * Provides a {@link MultiFactorResolver} suitable for completion of a
1598
+ * multi-factor flow.
1599
+ *
1600
+ * @param auth - The {@link Auth} instance.
1601
+ * @param error - The {@link MultiFactorError} raised during a sign-in, or
1602
+ * reauthentication operation.
1603
+ *
1604
+ * @public
1605
+ */
1606
+ export declare function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver;
1607
+
1608
+ declare interface GetRecaptchaConfigResponse {
1609
+ recaptchaKey: string;
1610
+ recaptchaEnforcementState: RecaptchaEnforcementProviderState[];
1611
+ }
1612
+
1613
+ /**
1614
+ * Returns a {@link UserCredential} from the redirect-based sign-in flow.
1615
+ *
1616
+ * @remarks
1617
+ * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an
1618
+ * error. If no redirect operation was called, returns `null`.
1619
+ *
1620
+ * This method does not work in a Node.js environment or with {@link Auth} instances created with a
1621
+ * {@link @firebase/app#FirebaseServerApp}.
1622
+ *
1623
+ * @example
1624
+ * ```javascript
1625
+ * // Sign in using a redirect.
1626
+ * const provider = new FacebookAuthProvider();
1627
+ * // You can add additional scopes to the provider:
1628
+ * provider.addScope('user_birthday');
1629
+ * // Start a sign in process for an unauthenticated user.
1630
+ * await signInWithRedirect(auth, provider);
1631
+ * // This will trigger a full page redirect away from your app
1632
+ *
1633
+ * // After returning from the redirect when your app initializes you can obtain the result
1634
+ * const result = await getRedirectResult(auth);
1635
+ * if (result) {
1636
+ * // This is the signed-in user
1637
+ * const user = result.user;
1638
+ * // This gives you a Facebook Access Token.
1639
+ * const credential = provider.credentialFromResult(auth, result);
1640
+ * const token = credential.accessToken;
1641
+ * }
1642
+ * // As this API can be used for sign-in, linking and reauthentication,
1643
+ * // check the operationType to determine what triggered this redirect
1644
+ * // operation.
1645
+ * const operationType = result.operationType;
1646
+ * ```
1647
+ *
1648
+ * @param auth - The {@link Auth} instance.
1649
+ * @param resolver - An instance of {@link PopupRedirectResolver}, optional
1650
+ * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
1651
+ *
1652
+ * @public
1653
+ */
1654
+ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise<UserCredential | null>;
1655
+
1656
+ /**
1657
+ * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GITHUB.
1658
+ *
1659
+ * @remarks
1660
+ * GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use
1661
+ * the {@link signInWithPopup} handler:
1662
+ *
1663
+ * @example
1664
+ * ```javascript
1665
+ * // Sign in using a redirect.
1666
+ * const provider = new GithubAuthProvider();
1667
+ * // Start a sign in process for an unauthenticated user.
1668
+ * provider.addScope('repo');
1669
+ * await signInWithRedirect(auth, provider);
1670
+ * // This will trigger a full page redirect away from your app
1671
+ *
1672
+ * // After returning from the redirect when your app initializes you can obtain the result
1673
+ * const result = await getRedirectResult(auth);
1674
+ * if (result) {
1675
+ * // This is the signed-in user
1676
+ * const user = result.user;
1677
+ * // This gives you a GitHub Access Token.
1678
+ * const credential = GithubAuthProvider.credentialFromResult(result);
1679
+ * const token = credential.accessToken;
1680
+ * }
1681
+ * ```
1682
+ *
1683
+ * @example
1684
+ * ```javascript
1685
+ * // Sign in using a popup.
1686
+ * const provider = new GithubAuthProvider();
1687
+ * provider.addScope('repo');
1688
+ * const result = await signInWithPopup(auth, provider);
1689
+ *
1690
+ * // The signed-in user info.
1691
+ * const user = result.user;
1692
+ * // This gives you a GitHub Access Token.
1693
+ * const credential = GithubAuthProvider.credentialFromResult(result);
1694
+ * const token = credential.accessToken;
1695
+ * ```
1696
+ * @public
1697
+ */
1698
+ export declare class GithubAuthProvider extends BaseOAuthProvider {
1699
+ /** Always set to {@link SignInMethod}.GITHUB. */
1700
+ static readonly GITHUB_SIGN_IN_METHOD: 'github.com';
1701
+ /** Always set to {@link ProviderId}.GITHUB. */
1702
+ static readonly PROVIDER_ID: 'github.com';
1703
+ constructor();
1704
+ /**
1705
+ * Creates a credential for GitHub.
1706
+ *
1707
+ * @param accessToken - GitHub access token.
1708
+ */
1709
+ static credential(accessToken: string): OAuthCredential;
1710
+ /**
1711
+ * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
1712
+ *
1713
+ * @param userCredential - The user credential.
1714
+ */
1715
+ static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
1716
+ /**
1717
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
1718
+ * thrown during a sign-in, link, or reauthenticate operation.
1719
+ *
1720
+ * @param userCredential - The user credential.
1721
+ */
1722
+ static credentialFromError(error: FirebaseError): OAuthCredential | null;
1723
+ private static credentialFromTaggedObject;
1724
+ }
1725
+
1726
+ /**
1727
+ * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GOOGLE.
1728
+ *
1729
+ * @example
1730
+ * ```javascript
1731
+ * // Sign in using a redirect.
1732
+ * const provider = new GoogleAuthProvider();
1733
+ * // Start a sign in process for an unauthenticated user.
1734
+ * provider.addScope('profile');
1735
+ * provider.addScope('email');
1736
+ * await signInWithRedirect(auth, provider);
1737
+ * // This will trigger a full page redirect away from your app
1738
+ *
1739
+ * // After returning from the redirect when your app initializes you can obtain the result
1740
+ * const result = await getRedirectResult(auth);
1741
+ * if (result) {
1742
+ * // This is the signed-in user
1743
+ * const user = result.user;
1744
+ * // This gives you a Google Access Token.
1745
+ * const credential = GoogleAuthProvider.credentialFromResult(result);
1746
+ * const token = credential.accessToken;
1747
+ * }
1748
+ * ```
1749
+ *
1750
+ * @example
1751
+ * ```javascript
1752
+ * // Sign in using a popup.
1753
+ * const provider = new GoogleAuthProvider();
1754
+ * provider.addScope('profile');
1755
+ * provider.addScope('email');
1756
+ * const result = await signInWithPopup(auth, provider);
1757
+ *
1758
+ * // The signed-in user info.
1759
+ * const user = result.user;
1760
+ * // This gives you a Google Access Token.
1761
+ * const credential = GoogleAuthProvider.credentialFromResult(result);
1762
+ * const token = credential.accessToken;
1763
+ * ```
1764
+ *
1765
+ * @public
1766
+ */
1767
+ export declare class GoogleAuthProvider extends BaseOAuthProvider {
1768
+ /** Always set to {@link SignInMethod}.GOOGLE. */
1769
+ static readonly GOOGLE_SIGN_IN_METHOD: 'google.com';
1770
+ /** Always set to {@link ProviderId}.GOOGLE. */
1771
+ static readonly PROVIDER_ID: 'google.com';
1772
+ constructor();
1773
+ /**
1774
+ * Creates a credential for Google. At least one of ID token and access token is required.
1775
+ *
1776
+ * @example
1777
+ * ```javascript
1778
+ * // \`googleUser\` from the onsuccess Google Sign In callback.
1779
+ * const credential = GoogleAuthProvider.credential(googleUser.getAuthResponse().id_token);
1780
+ * const result = await signInWithCredential(credential);
1781
+ * ```
1782
+ *
1783
+ * @param idToken - Google ID token.
1784
+ * @param accessToken - Google access token.
1785
+ */
1786
+ static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential;
1787
+ /**
1788
+ * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
1789
+ *
1790
+ * @param userCredential - The user credential.
1791
+ */
1792
+ static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
1793
+ /**
1794
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
1795
+ * thrown during a sign-in, link, or reauthenticate operation.
1796
+ *
1797
+ * @param userCredential - The user credential.
1798
+ */
1799
+ static credentialFromError(error: FirebaseError): OAuthCredential | null;
1800
+ private static credentialFromTaggedObject;
1801
+ }
1802
+
1803
+ /**
1804
+ * Raw encoded JWT
1805
+ *
1806
+ */
1807
+ declare type IdToken = string;
1808
+
1809
+ /**
1810
+ * @internal
1811
+ */
1812
+ declare interface IdTokenMfaResponse extends IdTokenResponse {
1813
+ mfaPendingCredential?: string;
1814
+ mfaInfo?: MfaEnrollment[];
1815
+ }
1816
+
1817
+ /**
1818
+ * IdToken as returned by the API
1819
+ *
1820
+ * @internal
1821
+ */
1822
+ declare interface IdTokenResponse {
1823
+ localId: string;
1824
+ idToken?: IdToken;
1825
+ refreshToken?: string;
1826
+ expiresIn?: string;
1827
+ providerId?: string;
1828
+ displayName?: string | null;
1829
+ isNewUser?: boolean;
1830
+ kind?: IdTokenResponseKind;
1831
+ photoUrl?: string | null;
1832
+ rawUserInfo?: string;
1833
+ screenName?: string | null;
1834
+ }
1835
+
1836
+ /**
1837
+ * The possible types of the `IdTokenResponse`
1838
+ *
1839
+ * @internal
1840
+ */
1841
+ declare const enum IdTokenResponseKind {
1842
+ CreateAuthUri = "identitytoolkit#CreateAuthUriResponse",
1843
+ DeleteAccount = "identitytoolkit#DeleteAccountResponse",
1844
+ DownloadAccount = "identitytoolkit#DownloadAccountResponse",
1845
+ EmailLinkSignin = "identitytoolkit#EmailLinkSigninResponse",
1846
+ GetAccountInfo = "identitytoolkit#GetAccountInfoResponse",
1847
+ GetOobConfirmationCode = "identitytoolkit#GetOobConfirmationCodeResponse",
1848
+ GetRecaptchaParam = "identitytoolkit#GetRecaptchaParamResponse",
1849
+ ResetPassword = "identitytoolkit#ResetPasswordResponse",
1850
+ SetAccountInfo = "identitytoolkit#SetAccountInfoResponse",
1851
+ SignupNewUser = "identitytoolkit#SignupNewUserResponse",
1852
+ UploadAccount = "identitytoolkit#UploadAccountResponse",
1853
+ VerifyAssertion = "identitytoolkit#VerifyAssertionResponse",
1854
+ VerifyCustomToken = "identitytoolkit#VerifyCustomTokenResponse",
1855
+ VerifyPassword = "identitytoolkit#VerifyPasswordResponse"
1856
+ }
1857
+
1858
+ /**
1859
+ * Interface representing ID token result obtained from {@link User.getIdTokenResult}.
1860
+ *
1861
+ * @remarks
1862
+ * `IdTokenResult` contains the ID token JWT string and other helper properties for getting different data
1863
+ * associated with the token as well as all the decoded payload claims.
1864
+ *
1865
+ * Note that these claims are not to be trusted as they are parsed client side. Only server side
1866
+ * verification can guarantee the integrity of the token claims.
1867
+ *
1868
+ * @public
1869
+ */
1870
+ export declare interface IdTokenResult {
1871
+ /**
1872
+ * The authentication time formatted as a UTC string.
1873
+ *
1874
+ * @remarks
1875
+ * This is the time the user authenticated (signed in) and not the time the token was refreshed.
1876
+ */
1877
+ authTime: string;
1878
+ /** The ID token expiration time formatted as a UTC string. */
1879
+ expirationTime: string;
1880
+ /** The ID token issuance time formatted as a UTC string. */
1881
+ issuedAtTime: string;
1882
+ /**
1883
+ * The sign-in provider through which the ID token was obtained (anonymous, custom, phone,
1884
+ * password, etc).
1885
+ *
1886
+ * @remarks
1887
+ * Note, this does not map to provider IDs.
1888
+ */
1889
+ signInProvider: string | null;
1890
+ /**
1891
+ * The type of second factor associated with this session, provided the user was multi-factor
1892
+ * authenticated (eg. phone, etc).
1893
+ */
1894
+ signInSecondFactor: string | null;
1895
+ /** The Firebase Auth ID token JWT string. */
1896
+ token: string;
1897
+ /**
1898
+ * The entire payload claims of the ID token including the standard reserved claims as well as
1899
+ * the custom claims.
1900
+ */
1901
+ claims: ParsedToken;
1902
+ }
1903
+
1904
+ /**
1905
+ * An implementation of {@link Persistence} of type `LOCAL` using `indexedDB`
1906
+ * for the underlying storage.
1907
+ *
1908
+ * @public
1909
+ */
1910
+ export declare const indexedDBLocalPersistence: Persistence;
1911
+
1912
+ /**
1913
+ * Initializes an {@link Auth} instance with fine-grained control over
1914
+ * {@link Dependencies}.
1915
+ *
1916
+ * @remarks
1917
+ *
1918
+ * This function allows more control over the {@link Auth} instance than
1919
+ * {@link getAuth}. `getAuth` uses platform-specific defaults to supply
1920
+ * the {@link Dependencies}. In general, `getAuth` is the easiest way to
1921
+ * initialize Auth and works for most use cases. Use `initializeAuth` if you
1922
+ * need control over which persistence layer is used, or to minimize bundle
1923
+ * size if you're not using either `signInWithPopup` or `signInWithRedirect`.
1924
+ *
1925
+ * For example, if your app only uses anonymous accounts and you only want
1926
+ * accounts saved for the current session, initialize `Auth` with:
1927
+ *
1928
+ * ```js
1929
+ * const auth = initializeAuth(app, {
1930
+ * persistence: browserSessionPersistence,
1931
+ * popupRedirectResolver: undefined,
1932
+ * });
1933
+ * ```
1934
+ *
1935
+ * @public
1936
+ */
1937
+ export declare function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth;
1938
+
1939
+ /**
1940
+ * Loads the reCAPTCHA configuration into the `Auth` instance.
1941
+ *
1942
+ * @remarks
1943
+ * This will load the reCAPTCHA config, which indicates whether the reCAPTCHA
1944
+ * verification flow should be triggered for each auth provider, into the
1945
+ * current Auth session.
1946
+ *
1947
+ * If initializeRecaptchaConfig() is not invoked, the auth flow will always start
1948
+ * without reCAPTCHA verification. If the provider is configured to require reCAPTCHA
1949
+ * verification, the SDK will transparently load the reCAPTCHA config and restart the
1950
+ * auth flows.
1951
+ *
1952
+ * Thus, by calling this optional method, you will reduce the latency of future auth flows.
1953
+ * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.
1954
+ *
1955
+ * This method does not work in a Node.js environment.
1956
+ *
1957
+ * @example
1958
+ * ```javascript
1959
+ * initializeRecaptchaConfig(auth);
1960
+ * ```
1961
+ *
1962
+ * @param auth - The {@link Auth} instance.
1963
+ *
1964
+ * @public
1965
+ */
1966
+ export declare function initializeRecaptchaConfig(auth: Auth): Promise<void>;
1967
+
1968
+ /**
1969
+ * An implementation of {@link Persistence} of type 'NONE'.
1970
+ *
1971
+ * @public
1972
+ */
1973
+ export declare const inMemoryPersistence: Persistence;
1974
+
1975
+ /**
1976
+ * Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.
1977
+ *
1978
+ * @param auth - The {@link Auth} instance.
1979
+ * @param emailLink - The link sent to the user's email address.
1980
+ *
1981
+ * @public
1982
+ */
1983
+ export declare function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean;
1984
+
1985
+ /**
1986
+ * Links the user account with the given credentials.
1987
+ *
1988
+ * @remarks
1989
+ * An {@link AuthProvider} can be used to generate the credential.
1990
+ *
1991
+ * @param user - The user.
1992
+ * @param credential - The auth credential.
1993
+ *
1994
+ * @public
1995
+ */
1996
+ export declare function linkWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
1997
+
1998
+ export declare function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void>;
1999
+
2000
+ /**
2001
+ * MfaEnrollment can be any subtype of BaseMfaEnrollment, currently only PhoneMfaEnrollment and TotpMfaEnrollment are supported.
2002
+ */
2003
+ declare type MfaEnrollment = PhoneMfaEnrollment | TotpMfaEnrollment;
2004
+
2005
+ /**
2006
+ * The {@link MultiFactorUser} corresponding to the user.
2007
+ *
2008
+ * @remarks
2009
+ * This is used to access all multi-factor properties and operations related to the user.
2010
+ *
2011
+ * @param user - The user.
2012
+ *
2013
+ * @public
2014
+ */
2015
+ export declare function multiFactor(user: User): MultiFactorUser;
2016
+
2017
+ /**
2018
+ * The base class for asserting ownership of a second factor.
2019
+ *
2020
+ * @remarks
2021
+ * This is used to facilitate enrollment of a second factor on an existing user or sign-in of a
2022
+ * user who already verified the first factor.
2023
+ *
2024
+ * @public
2025
+ */
2026
+ export declare interface MultiFactorAssertion {
2027
+ /** The identifier of the second factor. */
2028
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
2029
+ }
2030
+
2031
+ /**
2032
+ * The error thrown when the user needs to provide a second factor to sign in successfully.
2033
+ *
2034
+ * @remarks
2035
+ * The error code for this error is `auth/multi-factor-auth-required`.
2036
+ *
2037
+ * @example
2038
+ * ```javascript
2039
+ * let resolver;
2040
+ * let multiFactorHints;
2041
+ *
2042
+ * signInWithEmailAndPassword(auth, email, password)
2043
+ * .then((result) => {
2044
+ * // User signed in. No 2nd factor challenge is needed.
2045
+ * })
2046
+ * .catch((error) => {
2047
+ * if (error.code == 'auth/multi-factor-auth-required') {
2048
+ * resolver = getMultiFactorResolver(auth, error);
2049
+ * multiFactorHints = resolver.hints;
2050
+ * } else {
2051
+ * // Handle other errors.
2052
+ * }
2053
+ * });
2054
+ *
2055
+ * // Obtain a multiFactorAssertion by verifying the second factor.
2056
+ *
2057
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
2058
+ * ```
2059
+ *
2060
+ * @public
2061
+ */
2062
+ export declare interface MultiFactorError extends AuthError {
2063
+ /** Details about the MultiFactorError. */
2064
+ readonly customData: AuthError['customData'] & {
2065
+ /**
2066
+ * The type of operation (sign-in, linking, or re-authentication) that raised the error.
2067
+ */
2068
+ readonly operationType: (typeof OperationType)[keyof typeof OperationType];
2069
+ };
2070
+ }
2071
+
2072
+ /**
2073
+ * A structure containing the information of a second factor entity.
2074
+ *
2075
+ * @public
2076
+ */
2077
+ export declare interface MultiFactorInfo {
2078
+ /** The multi-factor enrollment ID. */
2079
+ readonly uid: string;
2080
+ /** The user friendly name of the current second factor. */
2081
+ readonly displayName?: string | null;
2082
+ /** The enrollment date of the second factor formatted as a UTC string. */
2083
+ readonly enrollmentTime: string;
2084
+ /** The identifier of the second factor. */
2085
+ readonly factorId: (typeof FactorId)[keyof typeof FactorId];
2086
+ }
2087
+
2088
+ /**
2089
+ * The class used to facilitate recovery from {@link MultiFactorError} when a user needs to
2090
+ * provide a second factor to sign in.
2091
+ *
2092
+ * @example
2093
+ * ```javascript
2094
+ * let resolver;
2095
+ * let multiFactorHints;
2096
+ *
2097
+ * signInWithEmailAndPassword(auth, email, password)
2098
+ * .then((result) => {
2099
+ * // User signed in. No 2nd factor challenge is needed.
2100
+ * })
2101
+ * .catch((error) => {
2102
+ * if (error.code == 'auth/multi-factor-auth-required') {
2103
+ * resolver = getMultiFactorResolver(auth, error);
2104
+ * // Show UI to let user select second factor.
2105
+ * multiFactorHints = resolver.hints;
2106
+ * } else {
2107
+ * // Handle other errors.
2108
+ * }
2109
+ * });
2110
+ *
2111
+ * // The enrolled second factors that can be used to complete
2112
+ * // sign-in are returned in the `MultiFactorResolver.hints` list.
2113
+ * // UI needs to be presented to allow the user to select a second factor
2114
+ * // from that list.
2115
+ *
2116
+ * const selectedHint = // ; selected from multiFactorHints
2117
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
2118
+ * const phoneInfoOptions = {
2119
+ * multiFactorHint: selectedHint,
2120
+ * session: resolver.session
2121
+ * };
2122
+ * const verificationId = phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
2123
+ * // Store `verificationId` and show UI to let user enter verification code.
2124
+ *
2125
+ * // UI to enter verification code and continue.
2126
+ * // Continue button click handler
2127
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
2128
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
2129
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
2130
+ * ```
2131
+ *
2132
+ * @public
2133
+ */
2134
+ export declare interface MultiFactorResolver {
2135
+ /**
2136
+ * The list of hints for the second factors needed to complete the sign-in for the current
2137
+ * session.
2138
+ */
2139
+ readonly hints: MultiFactorInfo[];
2140
+ /**
2141
+ * The session identifier for the current sign-in flow, which can be used to complete the second
2142
+ * factor sign-in.
2143
+ */
2144
+ readonly session: MultiFactorSession;
2145
+ /**
2146
+ * A helper function to help users complete sign in with a second factor using an
2147
+ * {@link MultiFactorAssertion} confirming the user successfully completed the second factor
2148
+ * challenge.
2149
+ *
2150
+ * @example
2151
+ * ```javascript
2152
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
2153
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
2154
+ * const userCredential = await resolver.resolveSignIn(multiFactorAssertion);
2155
+ * ```
2156
+ *
2157
+ * @param assertion - The multi-factor assertion to resolve sign-in with.
2158
+ * @returns The promise that resolves with the user credential object.
2159
+ */
2160
+ resolveSignIn(assertion: MultiFactorAssertion): Promise<UserCredential>;
2161
+ }
2162
+
2163
+ /**
2164
+ * An interface defining the multi-factor session object used for enrolling a second factor on a
2165
+ * user or helping sign in an enrolled user with a second factor.
2166
+ *
2167
+ * @public
2168
+ */
2169
+ export declare interface MultiFactorSession {
2170
+ }
2171
+
2172
+ /**
2173
+ * An interface that defines the multi-factor related properties and operations pertaining
2174
+ * to a {@link User}.
2175
+ *
2176
+ * @public
2177
+ */
2178
+ export declare interface MultiFactorUser {
2179
+ /** Returns a list of the user's enrolled second factors. */
2180
+ readonly enrolledFactors: MultiFactorInfo[];
2181
+ /**
2182
+ * Returns the session identifier for a second factor enrollment operation. This is used to
2183
+ * identify the user trying to enroll a second factor.
2184
+ *
2185
+ * @example
2186
+ * ```javascript
2187
+ * const multiFactorUser = multiFactor(auth.currentUser);
2188
+ * const multiFactorSession = await multiFactorUser.getSession();
2189
+ *
2190
+ * // Send verification code.
2191
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
2192
+ * const phoneInfoOptions = {
2193
+ * phoneNumber: phoneNumber,
2194
+ * session: multiFactorSession
2195
+ * };
2196
+ * const verificationId = await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
2197
+ *
2198
+ * // Obtain verification code from user.
2199
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
2200
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
2201
+ * await multiFactorUser.enroll(multiFactorAssertion);
2202
+ * ```
2203
+ *
2204
+ * @returns The promise that resolves with the {@link MultiFactorSession}.
2205
+ */
2206
+ getSession(): Promise<MultiFactorSession>;
2207
+ /**
2208
+ *
2209
+ * Enrolls a second factor as identified by the {@link MultiFactorAssertion} for the
2210
+ * user.
2211
+ *
2212
+ * @remarks
2213
+ * On resolution, the user tokens are updated to reflect the change in the JWT payload.
2214
+ * Accepts an additional display name parameter used to identify the second factor to the end
2215
+ * user. Recent re-authentication is required for this operation to succeed. On successful
2216
+ * enrollment, existing Firebase sessions (refresh tokens) are revoked. When a new factor is
2217
+ * enrolled, an email notification is sent to the user’s email.
2218
+ *
2219
+ * @example
2220
+ * ```javascript
2221
+ * const multiFactorUser = multiFactor(auth.currentUser);
2222
+ * const multiFactorSession = await multiFactorUser.getSession();
2223
+ *
2224
+ * // Send verification code.
2225
+ * const phoneAuthProvider = new PhoneAuthProvider(auth);
2226
+ * const phoneInfoOptions = {
2227
+ * phoneNumber: phoneNumber,
2228
+ * session: multiFactorSession
2229
+ * };
2230
+ * const verificationId = await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier);
2231
+ *
2232
+ * // Obtain verification code from user.
2233
+ * const phoneAuthCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
2234
+ * const multiFactorAssertion = PhoneMultiFactorGenerator.assertion(phoneAuthCredential);
2235
+ * await multiFactorUser.enroll(multiFactorAssertion);
2236
+ * // Second factor enrolled.
2237
+ * ```
2238
+ *
2239
+ * @param assertion - The multi-factor assertion to enroll with.
2240
+ * @param displayName - The display name of the second factor.
2241
+ */
2242
+ enroll(assertion: MultiFactorAssertion, displayName?: string | null): Promise<void>;
2243
+ /**
2244
+ * Unenrolls the specified second factor.
2245
+ *
2246
+ * @remarks
2247
+ * To specify the factor to remove, pass a {@link MultiFactorInfo} object (retrieved from
2248
+ * {@link MultiFactorUser.enrolledFactors}) or the
2249
+ * factor's UID string. Sessions are not revoked when the account is unenrolled. An email
2250
+ * notification is likely to be sent to the user notifying them of the change. Recent
2251
+ * re-authentication is required for this operation to succeed. When an existing factor is
2252
+ * unenrolled, an email notification is sent to the user’s email.
2253
+ *
2254
+ * @example
2255
+ * ```javascript
2256
+ * const multiFactorUser = multiFactor(auth.currentUser);
2257
+ * // Present user the option to choose which factor to unenroll.
2258
+ * await multiFactorUser.unenroll(multiFactorUser.enrolledFactors[i])
2259
+ * ```
2260
+ *
2261
+ * @param option - The multi-factor option to unenroll.
2262
+ * @returns - A `Promise` which resolves when the unenroll operation is complete.
2263
+ */
2264
+ unenroll(option: MultiFactorInfo | string): Promise<void>;
2265
+ }
2266
+
2267
+ declare type MutableUserInfo = {
2268
+ -readonly [K in keyof UserInfo]: UserInfo[K];
2269
+ };
2270
+ export { NextFn }
2271
+
2272
+ /**
2273
+ * Type definition for an event callback.
2274
+ *
2275
+ * @privateRemarks TODO(avolkovi): should we consolidate with Subscribe<T> since we're changing the API anyway?
2276
+ *
2277
+ * @public
2278
+ */
2279
+ export declare type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;
2280
+
2281
+ /**
2282
+ * Represents the OAuth credentials returned by an {@link OAuthProvider}.
2283
+ *
2284
+ * @remarks
2285
+ * Implementations specify the details about each auth provider's credential requirements.
2286
+ *
2287
+ * @public
2288
+ */
2289
+ export declare class OAuthCredential extends AuthCredential {
2290
+ /**
2291
+ * The OAuth ID token associated with the credential if it belongs to an OIDC provider,
2292
+ * such as `google.com`.
2293
+ * @readonly
2294
+ */
2295
+ idToken?: string;
2296
+ /**
2297
+ * The OAuth access token associated with the credential if it belongs to an
2298
+ * {@link OAuthProvider}, such as `facebook.com`, `twitter.com`, etc.
2299
+ * @readonly
2300
+ */
2301
+ accessToken?: string;
2302
+ /**
2303
+ * The OAuth access token secret associated with the credential if it belongs to an OAuth 1.0
2304
+ * provider, such as `twitter.com`.
2305
+ * @readonly
2306
+ */
2307
+ secret?: string;
2308
+ private nonce?;
2309
+ private pendingToken;
2310
+ /** @internal */
2311
+ static _fromParams(params: OAuthCredentialParams): OAuthCredential;
2312
+ /** {@inheritdoc AuthCredential.toJSON} */
2313
+ toJSON(): object;
2314
+ /**
2315
+ * Static method to deserialize a JSON representation of an object into an
2316
+ * {@link AuthCredential}.
2317
+ *
2318
+ * @param json - Input can be either Object or the stringified representation of the object.
2319
+ * When string is provided, JSON.parse would be called first.
2320
+ *
2321
+ * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2322
+ */
2323
+ static fromJSON(json: string | object): OAuthCredential | null;
2324
+ /** @internal */
2325
+ _getIdTokenResponse(auth: AuthInternal): Promise<IdTokenResponse>;
2326
+ /** @internal */
2327
+ _linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
2328
+ /** @internal */
2329
+ _getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
2330
+ private buildRequest;
2331
+ }
2332
+
2333
+ /**
2334
+ * Defines the options for initializing an {@link OAuthCredential}.
2335
+ *
2336
+ * @remarks
2337
+ * For ID tokens with nonce claim, the raw nonce has to also be provided.
2338
+ *
2339
+ * @public
2340
+ */
2341
+ export declare interface OAuthCredentialOptions {
2342
+ /**
2343
+ * The OAuth ID token used to initialize the {@link OAuthCredential}.
2344
+ */
2345
+ idToken?: string;
2346
+ /**
2347
+ * The OAuth access token used to initialize the {@link OAuthCredential}.
2348
+ */
2349
+ accessToken?: string;
2350
+ /**
2351
+ * The raw nonce associated with the ID token.
2352
+ *
2353
+ * @remarks
2354
+ * It is required when an ID token with a nonce field is provided. The SHA-256 hash of the
2355
+ * raw nonce must match the nonce field in the ID token.
2356
+ */
2357
+ rawNonce?: string;
2358
+ }
2359
+
2360
+ declare interface OAuthCredentialParams {
2361
+ idToken?: string | null;
2362
+ accessToken?: string | null;
2363
+ oauthToken?: string;
2364
+ secret?: string;
2365
+ oauthTokenSecret?: string;
2366
+ nonce?: string;
2367
+ pendingToken?: string;
2368
+ providerId: string;
2369
+ signInMethod: string;
2370
+ }
2371
+
2372
+ /**
2373
+ * Provider for generating generic {@link OAuthCredential}.
2374
+ *
2375
+ * @example
2376
+ * ```javascript
2377
+ * // Sign in using a redirect.
2378
+ * const provider = new OAuthProvider('google.com');
2379
+ * // Start a sign in process for an unauthenticated user.
2380
+ * provider.addScope('profile');
2381
+ * provider.addScope('email');
2382
+ * await signInWithRedirect(auth, provider);
2383
+ * // This will trigger a full page redirect away from your app
2384
+ *
2385
+ * // After returning from the redirect when your app initializes you can obtain the result
2386
+ * const result = await getRedirectResult(auth);
2387
+ * if (result) {
2388
+ * // This is the signed-in user
2389
+ * const user = result.user;
2390
+ * // This gives you a OAuth Access Token for the provider.
2391
+ * const credential = provider.credentialFromResult(auth, result);
2392
+ * const token = credential.accessToken;
2393
+ * }
2394
+ * ```
2395
+ *
2396
+ * @example
2397
+ * ```javascript
2398
+ * // Sign in using a popup.
2399
+ * const provider = new OAuthProvider('google.com');
2400
+ * provider.addScope('profile');
2401
+ * provider.addScope('email');
2402
+ * const result = await signInWithPopup(auth, provider);
2403
+ *
2404
+ * // The signed-in user info.
2405
+ * const user = result.user;
2406
+ * // This gives you a OAuth Access Token for the provider.
2407
+ * const credential = provider.credentialFromResult(auth, result);
2408
+ * const token = credential.accessToken;
2409
+ * ```
2410
+ * @public
2411
+ */
2412
+ export declare class OAuthProvider extends BaseOAuthProvider {
2413
+ /**
2414
+ * Creates an {@link OAuthCredential} from a JSON string or a plain object.
2415
+ * @param json - A plain object or a JSON string
2416
+ */
2417
+ static credentialFromJSON(json: object | string): OAuthCredential;
2418
+ /**
2419
+ * Creates a {@link OAuthCredential} from a generic OAuth provider's access token or ID token.
2420
+ *
2421
+ * @remarks
2422
+ * The raw nonce is required when an ID token with a nonce field is provided. The SHA-256 hash of
2423
+ * the raw nonce must match the nonce field in the ID token.
2424
+ *
2425
+ * @example
2426
+ * ```javascript
2427
+ * // `googleUser` from the onsuccess Google Sign In callback.
2428
+ * // Initialize a generate OAuth provider with a `google.com` providerId.
2429
+ * const provider = new OAuthProvider('google.com');
2430
+ * const credential = provider.credential({
2431
+ * idToken: googleUser.getAuthResponse().id_token,
2432
+ * });
2433
+ * const result = await signInWithCredential(credential);
2434
+ * ```
2435
+ *
2436
+ * @param params - Either the options object containing the ID token, access token and raw nonce
2437
+ * or the ID token string.
2438
+ */
2439
+ credential(params: OAuthCredentialOptions): OAuthCredential;
2440
+ /** An internal credential method that accepts more permissive options */
2441
+ private _credential;
2442
+ /**
2443
+ * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
2444
+ *
2445
+ * @param userCredential - The user credential.
2446
+ */
2447
+ static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
2448
+ /**
2449
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
2450
+ * thrown during a sign-in, link, or reauthenticate operation.
2451
+ *
2452
+ * @param userCredential - The user credential.
2453
+ */
2454
+ static credentialFromError(error: FirebaseError): OAuthCredential | null;
2455
+ private static oauthCredentialFromTaggedObject;
2456
+ }
2457
+
2458
+ /**
2459
+ * Adds an observer for changes to the user's sign-in state.
2460
+ *
2461
+ * @remarks
2462
+ * To keep the old behavior, see {@link onIdTokenChanged}.
2463
+ *
2464
+ * @param auth - The {@link Auth} instance.
2465
+ * @param nextOrObserver - callback triggered on change.
2466
+ * @param error - Deprecated. This callback is never triggered. Errors
2467
+ * on signing in/out can be caught in promises returned from
2468
+ * sign-in/sign-out functions.
2469
+ * @param completed - Deprecated. This callback is never triggered.
2470
+ *
2471
+ * @public
2472
+ */
2473
+ export declare function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
2474
+
2475
+ /**
2476
+ * Adds an observer for changes to the signed-in user's ID token.
2477
+ *
2478
+ * @remarks
2479
+ * This includes sign-in, sign-out, and token refresh events.
2480
+ * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.
2481
+ *
2482
+ * @param auth - The {@link Auth} instance.
2483
+ * @param nextOrObserver - callback triggered on change.
2484
+ * @param error - Deprecated. This callback is never triggered. Errors
2485
+ * on signing in/out can be caught in promises returned from
2486
+ * sign-in/sign-out functions.
2487
+ * @param completed - Deprecated. This callback is never triggered.
2488
+ *
2489
+ * @public
2490
+ */
2491
+ export declare function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
2492
+
2493
+ /**
2494
+ * Enumeration of supported operation types.
2495
+ *
2496
+ * @public
2497
+ */
2498
+ export declare const OperationType: {
2499
+ /** Operation involving linking an additional provider to an already signed-in user. */
2500
+ readonly LINK: "link";
2501
+ /** Operation involving using a provider to reauthenticate an already signed-in user. */
2502
+ readonly REAUTHENTICATE: "reauthenticate";
2503
+ /** Operation involving signing in a user. */
2504
+ readonly SIGN_IN: "signIn";
2505
+ };
2506
+
2507
+ /**
2508
+ * Parses the email action link string and returns an {@link ActionCodeURL} if
2509
+ * the link is valid, otherwise returns null.
2510
+ *
2511
+ * @public
2512
+ */
2513
+ export declare function parseActionCodeURL(link: string): ActionCodeURL | null;
2514
+
2515
+ /**
2516
+ * Interface representing a parsed ID token.
2517
+ *
2518
+ * @privateRemarks TODO(avolkovi): consolidate with parsed_token in implementation.
2519
+ *
2520
+ * @public
2521
+ */
2522
+ export declare interface ParsedToken {
2523
+ /** Expiration time of the token. */
2524
+ 'exp'?: string;
2525
+ /** UID of the user. */
2526
+ 'sub'?: string;
2527
+ /** Time at which authentication was performed. */
2528
+ 'auth_time'?: string;
2529
+ /** Issuance time of the token. */
2530
+ 'iat'?: string;
2531
+ /** Firebase specific claims, containing the provider(s) used to authenticate the user. */
2532
+ 'firebase'?: {
2533
+ 'sign_in_provider'?: string;
2534
+ 'sign_in_second_factor'?: string;
2535
+ 'identities'?: Record<string, string>;
2536
+ };
2537
+ /** Map of any additional custom claims. */
2538
+ [key: string]: unknown;
2539
+ }
2540
+
2541
+ /**
2542
+ * A structure specifying password policy requirements.
2543
+ *
2544
+ * @public
2545
+ */
2546
+ export declare interface PasswordPolicy {
2547
+ /**
2548
+ * Requirements enforced by this password policy.
2549
+ */
2550
+ readonly customStrengthOptions: {
2551
+ /**
2552
+ * Minimum password length, or undefined if not configured.
2553
+ */
2554
+ readonly minPasswordLength?: number;
2555
+ /**
2556
+ * Maximum password length, or undefined if not configured.
2557
+ */
2558
+ readonly maxPasswordLength?: number;
2559
+ /**
2560
+ * Whether the password should contain a lowercase letter, or undefined if not configured.
2561
+ */
2562
+ readonly containsLowercaseLetter?: boolean;
2563
+ /**
2564
+ * Whether the password should contain an uppercase letter, or undefined if not configured.
2565
+ */
2566
+ readonly containsUppercaseLetter?: boolean;
2567
+ /**
2568
+ * Whether the password should contain a numeric character, or undefined if not configured.
2569
+ */
2570
+ readonly containsNumericCharacter?: boolean;
2571
+ /**
2572
+ * Whether the password should contain a non-alphanumeric character, or undefined if not configured.
2573
+ */
2574
+ readonly containsNonAlphanumericCharacter?: boolean;
2575
+ };
2576
+ /**
2577
+ * List of characters that are considered non-alphanumeric during validation.
2578
+ */
2579
+ readonly allowedNonAlphanumericCharacters: string;
2580
+ /**
2581
+ * The enforcement state of the policy. Can be 'OFF' or 'ENFORCE'.
2582
+ */
2583
+ readonly enforcementState: string;
2584
+ /**
2585
+ * Whether existing passwords must meet the policy.
2586
+ */
2587
+ readonly forceUpgradeOnSignin: boolean;
2588
+ }
2589
+
2590
+ /**
2591
+ * Internal typing of the password policy custom strength options that is modifiable. This
2592
+ * allows us to construct the strength options before storing them in the policy.
2593
+ *
2594
+ * @internal
2595
+ */
2596
+ declare interface PasswordPolicyCustomStrengthOptions {
2597
+ /**
2598
+ * Minimum password length.
2599
+ */
2600
+ minPasswordLength?: number;
2601
+ /**
2602
+ * Maximum password length.
2603
+ */
2604
+ maxPasswordLength?: number;
2605
+ /**
2606
+ * Whether the password should contain a lowercase letter.
2607
+ */
2608
+ containsLowercaseLetter?: boolean;
2609
+ /**
2610
+ * Whether the password should contain an uppercase letter.
2611
+ */
2612
+ containsUppercaseLetter?: boolean;
2613
+ /**
2614
+ * Whether the password should contain a numeric character.
2615
+ */
2616
+ containsNumericCharacter?: boolean;
2617
+ /**
2618
+ * Whether the password should contain a non-alphanumeric character.
2619
+ */
2620
+ containsNonAlphanumericCharacter?: boolean;
2621
+ }
2622
+
2623
+ /**
2624
+ * Internal typing of password policy that includes the schema version and methods for
2625
+ * validating that a password meets the policy. The developer does not need access to
2626
+ * these properties and methods, so they are excluded from the public typing.
2627
+ *
2628
+ * @internal
2629
+ */
2630
+ declare interface PasswordPolicyInternal extends PasswordPolicy {
2631
+ /**
2632
+ * Requirements enforced by the password policy.
2633
+ */
2634
+ readonly customStrengthOptions: PasswordPolicyCustomStrengthOptions;
2635
+ /**
2636
+ * Schema version of the password policy.
2637
+ */
2638
+ readonly schemaVersion: number;
2639
+ /**
2640
+ * Validates the password against the policy.
2641
+ * @param password Password to validate.
2642
+ */
2643
+ validatePassword(password: string): PasswordValidationStatus;
2644
+ }
2645
+
2646
+ /**
2647
+ * A structure indicating which password policy requirements were met or violated and what the
2648
+ * requirements are.
2649
+ *
2650
+ * @public
2651
+ */
2652
+ export declare interface PasswordValidationStatus {
2653
+ /**
2654
+ * Whether the password meets all requirements.
2655
+ */
2656
+ readonly isValid: boolean;
2657
+ /**
2658
+ * Whether the password meets the minimum password length, or undefined if not required.
2659
+ */
2660
+ readonly meetsMinPasswordLength?: boolean;
2661
+ /**
2662
+ * Whether the password meets the maximum password length, or undefined if not required.
2663
+ */
2664
+ readonly meetsMaxPasswordLength?: boolean;
2665
+ /**
2666
+ * Whether the password contains a lowercase letter, or undefined if not required.
2667
+ */
2668
+ readonly containsLowercaseLetter?: boolean;
2669
+ /**
2670
+ * Whether the password contains an uppercase letter, or undefined if not required.
2671
+ */
2672
+ readonly containsUppercaseLetter?: boolean;
2673
+ /**
2674
+ * Whether the password contains a numeric character, or undefined if not required.
2675
+ */
2676
+ readonly containsNumericCharacter?: boolean;
2677
+ /**
2678
+ * Whether the password contains a non-alphanumeric character, or undefined if not required.
2679
+ */
2680
+ readonly containsNonAlphanumericCharacter?: boolean;
2681
+ /**
2682
+ * The policy used to validate the password.
2683
+ */
2684
+ readonly passwordPolicy: PasswordPolicy;
2685
+ }
2686
+
2687
+ declare type PersistedBlob = Record<string, unknown>;
2688
+
2689
+ /**
2690
+ * An interface covering the possible persistence mechanism types.
2691
+ *
2692
+ * @public
2693
+ */
2694
+ export declare interface Persistence {
2695
+ /**
2696
+ * Type of Persistence.
2697
+ * - 'SESSION' is used for temporary persistence such as `sessionStorage`.
2698
+ * - 'LOCAL' is used for long term persistence such as `localStorage` or `IndexedDB`.
2699
+ * - 'NONE' is used for in-memory, or no persistence.
2700
+ * - 'COOKIE' is used for cookie persistence, useful for server-side rendering.
2701
+ */
2702
+ readonly type: 'SESSION' | 'LOCAL' | 'NONE' | 'COOKIE';
2703
+ }
2704
+
2705
+ declare interface PersistenceInternal extends Persistence {
2706
+ type: PersistenceType;
2707
+ _isAvailable(): Promise<boolean>;
2708
+ _set(key: string, value: PersistenceValue): Promise<void>;
2709
+ _get<T extends PersistenceValue>(key: string): Promise<T | null>;
2710
+ _remove(key: string): Promise<void>;
2711
+ _addListener(key: string, listener: StorageEventListener): void;
2712
+ _removeListener(key: string, listener: StorageEventListener): void;
2713
+ _shouldAllowMigration?: boolean;
2714
+ }
2715
+
2716
+ declare const enum PersistenceType {
2717
+ SESSION = "SESSION",
2718
+ LOCAL = "LOCAL",
2719
+ NONE = "NONE",
2720
+ COOKIE = "COOKIE"
2721
+ }
2722
+
2723
+ declare type PersistenceValue = PersistedBlob | string;
2724
+
2725
+ /**
2726
+ * Represents the credentials returned by {@link PhoneAuthProvider}.
2727
+ *
2728
+ * @public
2729
+ */
2730
+ export declare class PhoneAuthCredential extends AuthCredential {
2731
+ private readonly params;
2732
+ private constructor();
2733
+ /** @internal */
2734
+ static _fromVerification(verificationId: string, verificationCode: string): PhoneAuthCredential;
2735
+ /** @internal */
2736
+ static _fromTokenResponse(phoneNumber: string, temporaryProof: string): PhoneAuthCredential;
2737
+ /** @internal */
2738
+ _getIdTokenResponse(auth: AuthInternal): Promise<PhoneOrOauthTokenResponse>;
2739
+ /** @internal */
2740
+ _linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
2741
+ /** @internal */
2742
+ _getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
2743
+ /** @internal */
2744
+ _makeVerificationRequest(): SignInWithPhoneNumberRequest;
2745
+ /** {@inheritdoc AuthCredential.toJSON} */
2746
+ toJSON(): object;
2747
+ /** Generates a phone credential based on a plain object or a JSON string. */
2748
+ static fromJSON(json: object | string): PhoneAuthCredential | null;
2749
+ }
2750
+
2751
+ /**
2752
+ * The information required to verify the ownership of a phone number.
2753
+ *
2754
+ * @remarks
2755
+ * The information that's required depends on whether you are doing single-factor sign-in,
2756
+ * multi-factor enrollment or multi-factor sign-in.
2757
+ *
2758
+ * @public
2759
+ */
2760
+ export declare type PhoneInfoOptions = PhoneSingleFactorInfoOptions | PhoneMultiFactorEnrollInfoOptions | PhoneMultiFactorSignInInfoOptions;
2761
+
2762
+ /**
2763
+ * An MFA provided by SMS verification.
2764
+ */
2765
+ declare interface PhoneMfaEnrollment extends BaseMfaEnrollment {
2766
+ phoneInfo: string;
2767
+ }
2768
+
2769
+ /**
2770
+ * The class for asserting ownership of a phone second factor. Provided by
2771
+ * {@link PhoneMultiFactorGenerator.assertion}.
2772
+ *
2773
+ * @public
2774
+ */
2775
+ export declare interface PhoneMultiFactorAssertion extends MultiFactorAssertion {
2776
+ }
2777
+
2778
+ /**
2779
+ * Options used for enrolling a second factor.
2780
+ *
2781
+ * @public
2782
+ */
2783
+ export declare interface PhoneMultiFactorEnrollInfoOptions {
2784
+ /** Phone number to send a verification code to. */
2785
+ phoneNumber: string;
2786
+ /** The {@link MultiFactorSession} obtained via {@link MultiFactorUser.getSession}. */
2787
+ session: MultiFactorSession;
2788
+ }
2789
+
2790
+ /**
2791
+ * The subclass of the {@link MultiFactorInfo} interface for phone number
2792
+ * second factors. The `factorId` of this second factor is {@link FactorId}.PHONE.
2793
+ * @public
2794
+ */
2795
+ export declare interface PhoneMultiFactorInfo extends MultiFactorInfo {
2796
+ /** The phone number associated with the current second factor. */
2797
+ readonly phoneNumber: string;
2798
+ }
2799
+
2800
+ /**
2801
+ * Options used for signing in with a second factor.
2802
+ *
2803
+ * @public
2804
+ */
2805
+ export declare interface PhoneMultiFactorSignInInfoOptions {
2806
+ /**
2807
+ * The {@link MultiFactorInfo} obtained via {@link MultiFactorResolver.hints}.
2808
+ *
2809
+ * One of `multiFactorHint` or `multiFactorUid` is required.
2810
+ */
2811
+ multiFactorHint?: MultiFactorInfo;
2812
+ /**
2813
+ * The uid of the second factor.
2814
+ *
2815
+ * One of `multiFactorHint` or `multiFactorUid` is required.
2816
+ */
2817
+ multiFactorUid?: string;
2818
+ /** The {@link MultiFactorSession} obtained via {@link MultiFactorResolver.session}. */
2819
+ session: MultiFactorSession;
2820
+ }
2821
+
2822
+ /**
2823
+ * @internal
2824
+ */
2825
+ declare type PhoneOrOauthTokenResponse = SignInWithPhoneNumberResponse | SignInWithIdpResponse | IdTokenResponse;
2826
+
2827
+ /**
2828
+ * Options used for single-factor sign-in.
2829
+ *
2830
+ * @public
2831
+ */
2832
+ export declare interface PhoneSingleFactorInfoOptions {
2833
+ /** Phone number to send a verification code to. */
2834
+ phoneNumber: string;
2835
+ }
2836
+
2837
+ /**
2838
+ * A resolver used for handling DOM specific operations like {@link signInWithPopup}
2839
+ * or {@link signInWithRedirect}.
2840
+ *
2841
+ * @public
2842
+ */
2843
+ export declare interface PopupRedirectResolver {
2844
+ }
2845
+
2846
+ /**
2847
+ * We need to mark this interface as internal explicitly to exclude it in the public typings, because
2848
+ * it references AuthInternal which has a circular dependency with UserInternal.
2849
+ *
2850
+ * @internal
2851
+ */
2852
+ declare interface PopupRedirectResolverInternal extends PopupRedirectResolver {
2853
+ _shouldInitProactively: boolean;
2854
+ _initialize(auth: AuthInternal): Promise<EventManager>;
2855
+ _openPopup(auth: AuthInternal, provider: AuthProvider, authType: AuthEventType, eventId?: string): Promise<AuthPopup>;
2856
+ _openRedirect(auth: AuthInternal, provider: AuthProvider, authType: AuthEventType, eventId?: string): Promise<void | never>;
2857
+ _isIframeWebStorageSupported(auth: AuthInternal, cb: (support: boolean) => unknown): void;
2858
+ _redirectPersistence: Persistence;
2859
+ _originValidation(auth: Auth): Promise<void>;
2860
+ _completeRedirectFn: (auth: Auth, resolver: PopupRedirectResolver, bypassAuthState: boolean) => Promise<UserCredential | null>;
2861
+ _overrideRedirectResult: (auth: AuthInternal, resultGetter: () => Promise<UserCredentialInternal | null>) => void;
2862
+ }
2863
+
2864
+ /**
2865
+ * A minimal error map with all verbose error messages stripped.
2866
+ *
2867
+ * See discussion at {@link AuthErrorMap}
2868
+ *
2869
+ * @public
2870
+ */
2871
+ export declare const prodErrorMap: AuthErrorMap;
2872
+
2873
+ /**
2874
+ * Enumeration of supported providers.
2875
+ *
2876
+ * @public
2877
+ */
2878
+ export declare const ProviderId: {
2879
+ /** Facebook provider ID */
2880
+ readonly FACEBOOK: "facebook.com";
2881
+ /** GitHub provider ID */
2882
+ readonly GITHUB: "github.com";
2883
+ /** Google provider ID */
2884
+ readonly GOOGLE: "google.com";
2885
+ /** Password provider */
2886
+ readonly PASSWORD: "password";
2887
+ /** Phone provider */
2888
+ readonly PHONE: "phone";
2889
+ /** Twitter provider ID */
2890
+ readonly TWITTER: "twitter.com";
2891
+ };
2892
+
2893
+ /**
2894
+ * @license
2895
+ * Copyright 2021 Google LLC
2896
+ *
2897
+ * Licensed under the Apache License, Version 2.0 (the "License");
2898
+ * you may not use this file except in compliance with the License.
2899
+ * You may obtain a copy of the License at
2900
+ *
2901
+ * http://www.apache.org/licenses/LICENSE-2.0
2902
+ *
2903
+ * Unless required by applicable law or agreed to in writing, software
2904
+ * distributed under the License is distributed on an "AS IS" BASIS,
2905
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2906
+ * See the License for the specific language governing permissions and
2907
+ * limitations under the License.
2908
+ */
2909
+ /**
2910
+ * Enumeration of supported providers.
2911
+ * @internal
2912
+ */
2913
+ declare const enum ProviderId_2 {
2914
+ /** @internal */
2915
+ ANONYMOUS = "anonymous",
2916
+ /** @internal */
2917
+ CUSTOM = "custom",
2918
+ /** Facebook provider ID */
2919
+ FACEBOOK = "facebook.com",
2920
+ /** @internal */
2921
+ FIREBASE = "firebase",
2922
+ /** GitHub provider ID */
2923
+ GITHUB = "github.com",
2924
+ /** Google provider ID */
2925
+ GOOGLE = "google.com",
2926
+ /** Password provider */
2927
+ PASSWORD = "password",
2928
+ /** Phone provider */
2929
+ PHONE = "phone",
2930
+ /** Twitter provider ID */
2931
+ TWITTER = "twitter.com"
2932
+ }
2933
+
2934
+ declare interface ProviderUserInfo {
2935
+ providerId: string;
2936
+ rawId?: string;
2937
+ email?: string;
2938
+ displayName?: string;
2939
+ photoUrl?: string;
2940
+ phoneNumber?: string;
2941
+ }
2942
+
2943
+ /**
2944
+ * Interface for a supplied `AsyncStorage`.
2945
+ *
2946
+ * @public
2947
+ */
2948
+ export declare interface ReactNativeAsyncStorage {
2949
+ /**
2950
+ * Persist an item in storage.
2951
+ *
2952
+ * @param key - storage key.
2953
+ * @param value - storage value.
2954
+ */
2955
+ setItem(key: string, value: string): Promise<void>;
2956
+ /**
2957
+ * Retrieve an item from storage.
2958
+ *
2959
+ * @param key - storage key.
2960
+ */
2961
+ getItem(key: string): Promise<string | null>;
2962
+ /**
2963
+ * Remove an item from storage.
2964
+ *
2965
+ * @param key - storage key.
2966
+ */
2967
+ removeItem(key: string): Promise<void>;
2968
+ }
2969
+
2970
+ /**
2971
+ * Re-authenticates a user using a fresh credential.
2972
+ *
2973
+ * @remarks
2974
+ * Use before operations such as {@link updatePassword} that require tokens from recent sign-in
2975
+ * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
2976
+ * or a `TOKEN_EXPIRED` error.
2977
+ *
2978
+ * This method is not supported on any {@link User} signed in by {@link Auth} instances
2979
+ * created with a {@link @firebase/app#FirebaseServerApp}.
2980
+ *
2981
+ * @param user - The user.
2982
+ * @param credential - The auth credential.
2983
+ *
2984
+ * @public
2985
+ */
2986
+ export declare function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
2987
+
2988
+ export declare function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void>;
2989
+
2990
+ declare class RecaptchaConfig {
2991
+ /**
2992
+ * The reCAPTCHA site key.
2993
+ */
2994
+ siteKey: string;
2995
+ /**
2996
+ * The list of providers and their enablement status for reCAPTCHA Enterprise.
2997
+ */
2998
+ recaptchaEnforcementState: RecaptchaEnforcementProviderState[];
2999
+ constructor(response: GetRecaptchaConfigResponse);
3000
+ /**
3001
+ * Returns the reCAPTCHA Enterprise enforcement state for the given provider.
3002
+ *
3003
+ * @param providerStr - The provider whose enforcement state is to be returned.
3004
+ * @returns The reCAPTCHA Enterprise enforcement state for the given provider.
3005
+ */
3006
+ getProviderEnforcementState(providerStr: string): EnforcementState | null;
3007
+ /**
3008
+ * Returns true if the reCAPTCHA Enterprise enforcement state for the provider is set to ENFORCE or AUDIT.
3009
+ *
3010
+ * @param providerStr - The provider whose enablement state is to be returned.
3011
+ * @returns Whether or not reCAPTCHA Enterprise protection is enabled for the given provider.
3012
+ */
3013
+ isProviderEnabled(providerStr: string): boolean;
3014
+ /**
3015
+ * Returns true if reCAPTCHA Enterprise protection is enabled in at least one provider, otherwise
3016
+ * returns false.
3017
+ *
3018
+ * @returns Whether or not reCAPTCHA Enterprise protection is enabled for at least one provider.
3019
+ */
3020
+ isAnyProviderEnabled(): boolean;
3021
+ }
3022
+
3023
+ declare interface RecaptchaEnforcementProviderState {
3024
+ provider: string;
3025
+ enforcementState: string;
3026
+ }
3027
+
3028
+ /**
3029
+ * Interface representing reCAPTCHA parameters.
3030
+ *
3031
+ * See the {@link https://developers.google.com/recaptcha/docs/display#render_param | reCAPTCHA docs}
3032
+ * for the list of accepted parameters. All parameters are accepted except for `sitekey`: Firebase Auth
3033
+ * provisions a reCAPTCHA for each project and will configure the site key upon rendering.
3034
+ *
3035
+ * For an invisible reCAPTCHA, set the `size` key to `invisible`.
3036
+ *
3037
+ * @public
3038
+ */
3039
+ export declare interface RecaptchaParameters {
3040
+ [key: string]: any;
3041
+ }
3042
+
3043
+ /**
3044
+ * Reloads user account data, if signed in.
3045
+ *
3046
+ * @param user - The user.
3047
+ *
3048
+ * @public
3049
+ */
3050
+ export declare function reload(user: User): Promise<void>;
3051
+
3052
+ /**
3053
+ * Revokes the given access token. Currently only supports Apple OAuth access tokens.
3054
+ *
3055
+ * @param auth - The {@link Auth} instance.
3056
+ * @param token - The Apple OAuth access token.
3057
+ *
3058
+ * @public
3059
+ */
3060
+ export declare function revokeAccessToken(auth: Auth, token: string): Promise<void>;
3061
+
3062
+ /**
3063
+ * An {@link AuthProvider} for SAML.
3064
+ *
3065
+ * @public
3066
+ */
3067
+ export declare class SAMLAuthProvider extends FederatedAuthProvider {
3068
+ /**
3069
+ * Constructor. The providerId must start with "saml."
3070
+ * @param providerId - SAML provider ID.
3071
+ */
3072
+ constructor(providerId: string);
3073
+ /**
3074
+ * Generates an {@link AuthCredential} from a {@link UserCredential} after a
3075
+ * successful SAML flow completes.
3076
+ *
3077
+ * @remarks
3078
+ *
3079
+ * For example, to get an {@link AuthCredential}, you could write the
3080
+ * following code:
3081
+ *
3082
+ * ```js
3083
+ * const userCredential = await signInWithPopup(auth, samlProvider);
3084
+ * const credential = SAMLAuthProvider.credentialFromResult(userCredential);
3085
+ * ```
3086
+ *
3087
+ * @param userCredential - The user credential.
3088
+ */
3089
+ static credentialFromResult(userCredential: UserCredential): AuthCredential | null;
3090
+ /**
3091
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
3092
+ * thrown during a sign-in, link, or reauthenticate operation.
3093
+ *
3094
+ * @param userCredential - The user credential.
3095
+ */
3096
+ static credentialFromError(error: FirebaseError): AuthCredential | null;
3097
+ /**
3098
+ * Creates an {@link AuthCredential} from a JSON string or a plain object.
3099
+ * @param json - A plain object or a JSON string
3100
+ */
3101
+ static credentialFromJSON(json: string | object): AuthCredential;
3102
+ private static samlCredentialFromTaggedObject;
3103
+ }
3104
+
3105
+ /**
3106
+ * Sends a verification email to a user.
3107
+ *
3108
+ * @remarks
3109
+ * The verification process is completed by calling {@link applyActionCode}.
3110
+ *
3111
+ * @example
3112
+ * ```javascript
3113
+ * const actionCodeSettings = {
3114
+ * url: 'https://www.example.com/?email=user@example.com',
3115
+ * iOS: {
3116
+ * bundleId: 'com.example.ios'
3117
+ * },
3118
+ * android: {
3119
+ * packageName: 'com.example.android',
3120
+ * installApp: true,
3121
+ * minimumVersion: '12'
3122
+ * },
3123
+ * handleCodeInApp: true
3124
+ * };
3125
+ * await sendEmailVerification(user, actionCodeSettings);
3126
+ * // Obtain code from the user.
3127
+ * await applyActionCode(auth, code);
3128
+ * ```
3129
+ *
3130
+ * @param user - The user.
3131
+ * @param actionCodeSettings - The {@link ActionCodeSettings}.
3132
+ *
3133
+ * @public
3134
+ */
3135
+ export declare function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
3136
+
3137
+ /**
3138
+ * Sends a password reset email to the given email address. This method does not throw an error when
3139
+ * there's no user account with the given email address and
3140
+ * {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}
3141
+ * is enabled.
3142
+ *
3143
+ * @remarks
3144
+ * To complete the password reset, call {@link confirmPasswordReset} with the code supplied in
3145
+ * the email sent to the user, along with the new password specified by the user.
3146
+ *
3147
+ * @example
3148
+ * ```javascript
3149
+ * const actionCodeSettings = {
3150
+ * url: 'https://www.example.com/?email=user@example.com',
3151
+ * iOS: {
3152
+ * bundleId: 'com.example.ios'
3153
+ * },
3154
+ * android: {
3155
+ * packageName: 'com.example.android',
3156
+ * installApp: true,
3157
+ * minimumVersion: '12'
3158
+ * },
3159
+ * handleCodeInApp: true
3160
+ * };
3161
+ * await sendPasswordResetEmail(auth, 'user@example.com', actionCodeSettings);
3162
+ * // Obtain code from user.
3163
+ * await confirmPasswordReset('user@example.com', code);
3164
+ * ```
3165
+ *
3166
+ * @param auth - The {@link Auth} instance.
3167
+ * @param email - The user's email address.
3168
+ * @param actionCodeSettings - The {@link ActionCodeSettings}.
3169
+ *
3170
+ * @public
3171
+ */
3172
+ export declare function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise<void>;
3173
+
3174
+ /**
3175
+ * Sends a sign-in email link to the user with the specified email.
3176
+ *
3177
+ * @remarks
3178
+ * The sign-in operation has to always be completed in the app unlike other out of band email
3179
+ * actions (password reset and email verifications). This is because, at the end of the flow,
3180
+ * the user is expected to be signed in and their Auth state persisted within the app.
3181
+ *
3182
+ * To complete sign in with the email link, call {@link signInWithEmailLink} with the email
3183
+ * address and the email link supplied in the email sent to the user.
3184
+ *
3185
+ * @example
3186
+ * ```javascript
3187
+ * const actionCodeSettings = {
3188
+ * url: 'https://www.example.com/?email=user@example.com',
3189
+ * iOS: {
3190
+ * bundleId: 'com.example.ios'
3191
+ * },
3192
+ * android: {
3193
+ * packageName: 'com.example.android',
3194
+ * installApp: true,
3195
+ * minimumVersion: '12'
3196
+ * },
3197
+ * handleCodeInApp: true
3198
+ * };
3199
+ * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);
3200
+ * // Obtain emailLink from the user.
3201
+ * if(isSignInWithEmailLink(auth, emailLink)) {
3202
+ * await signInWithEmailLink(auth, 'user@example.com', emailLink);
3203
+ * }
3204
+ * ```
3205
+ *
3206
+ * @param authInternal - The {@link Auth} instance.
3207
+ * @param email - The user's email address.
3208
+ * @param actionCodeSettings - The {@link ActionCodeSettings}.
3209
+ *
3210
+ * @public
3211
+ */
3212
+ export declare function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise<void>;
3213
+
3214
+ /**
3215
+ * Changes the type of persistence on the {@link Auth} instance for the currently saved
3216
+ * `Auth` session and applies this type of persistence for future sign-in requests, including
3217
+ * sign-in with redirect requests.
3218
+ *
3219
+ * @remarks
3220
+ * This makes it easy for a user signing in to specify whether their session should be
3221
+ * remembered or not. It also makes it easier to never persist the `Auth` state for applications
3222
+ * that are shared by other users or have sensitive data.
3223
+ *
3224
+ * This method does not work in a Node.js environment or with {@link Auth} instances created with a
3225
+ * {@link @firebase/app#FirebaseServerApp}.
3226
+ *
3227
+ * @example
3228
+ * ```javascript
3229
+ * setPersistence(auth, browserSessionPersistence);
3230
+ * ```
3231
+ *
3232
+ * @param auth - The {@link Auth} instance.
3233
+ * @param persistence - The {@link Persistence} to use.
3234
+ * @returns A `Promise` that resolves once the persistence change has completed
3235
+ *
3236
+ * @public
3237
+ */
3238
+ export declare function setPersistence(auth: Auth, persistence: Persistence): Promise<void>;
3239
+
3240
+ /**
3241
+ * Asynchronously signs in as an anonymous user.
3242
+ *
3243
+ * @remarks
3244
+ * If there is already an anonymous user signed in, that user will be returned; otherwise, a
3245
+ * new anonymous user identity will be created and returned.
3246
+ *
3247
+ * This method is not supported by {@link Auth} instances created with a
3248
+ * {@link @firebase/app#FirebaseServerApp}.
3249
+ *
3250
+ * @param auth - The {@link Auth} instance.
3251
+ *
3252
+ * @public
3253
+ */
3254
+ export declare function signInAnonymously(auth: Auth): Promise<UserCredential>;
3255
+
3256
+ /**
3257
+ * Enumeration of supported sign-in methods.
3258
+ *
3259
+ * @public
3260
+ */
3261
+ export declare const SignInMethod: {
3262
+ /** Email link sign in method */
3263
+ readonly EMAIL_LINK: "emailLink";
3264
+ /** Email/password sign in method */
3265
+ readonly EMAIL_PASSWORD: "password";
3266
+ /** Facebook sign in method */
3267
+ readonly FACEBOOK: "facebook.com";
3268
+ /** GitHub sign in method */
3269
+ readonly GITHUB: "github.com";
3270
+ /** Google sign in method */
3271
+ readonly GOOGLE: "google.com";
3272
+ /** Phone sign in method */
3273
+ readonly PHONE: "phone";
3274
+ /** Twitter sign in method */
3275
+ readonly TWITTER: "twitter.com";
3276
+ };
3277
+
3278
+ /**
3279
+ * Asynchronously signs in with the given credentials.
3280
+ *
3281
+ * @remarks
3282
+ * An {@link AuthProvider} can be used to generate the credential.
3283
+ *
3284
+ * This method is not supported by {@link Auth} instances created with a
3285
+ * {@link @firebase/app#FirebaseServerApp}.
3286
+ *
3287
+ * @param auth - The {@link Auth} instance.
3288
+ * @param credential - The auth credential.
3289
+ *
3290
+ * @public
3291
+ */
3292
+ export declare function signInWithCredential(auth: Auth, credential: AuthCredential): Promise<UserCredential>;
3293
+
3294
+ /**
3295
+ * Asynchronously signs in using a custom token.
3296
+ *
3297
+ * @remarks
3298
+ * Custom tokens are used to integrate Firebase Auth with existing auth systems, and must
3299
+ * be generated by an auth backend using the
3300
+ * {@link https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken | createCustomToken}
3301
+ * method in the {@link https://firebase.google.com/docs/auth/admin | Admin SDK} .
3302
+ *
3303
+ * Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.
3304
+ *
3305
+ * This method is not supported by {@link Auth} instances created with a
3306
+ * {@link @firebase/app#FirebaseServerApp}.
3307
+ *
3308
+ * @param auth - The {@link Auth} instance.
3309
+ * @param customToken - The custom token to sign in with.
3310
+ *
3311
+ * @public
3312
+ */
3313
+ export declare function signInWithCustomToken(auth: Auth, customToken: string): Promise<UserCredential>;
3314
+
3315
+ /**
3316
+ * Asynchronously signs in using an email and password.
3317
+ *
3318
+ * @remarks
3319
+ * Fails with an error if the email address and password do not match. When
3320
+ * {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}
3321
+ * is enabled, this method fails with "auth/invalid-credential" in case of an invalid
3322
+ * email/password.
3323
+ *
3324
+ * This method is not supported on {@link Auth} instances created with a
3325
+ * {@link @firebase/app#FirebaseServerApp}.
3326
+ *
3327
+ * Note: The user's password is NOT the password used to access the user's email account. The
3328
+ * email address serves as a unique identifier for the user, and the password is used to access
3329
+ * the user's account in your Firebase project. See also: {@link createUserWithEmailAndPassword}.
3330
+ *
3331
+ *
3332
+ * @param auth - The {@link Auth} instance.
3333
+ * @param email - The users email address.
3334
+ * @param password - The users password.
3335
+ *
3336
+ * @public
3337
+ */
3338
+ export declare function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
3339
+
3340
+ /**
3341
+ * Asynchronously signs in using an email and sign-in email link.
3342
+ *
3343
+ * @remarks
3344
+ * If no link is passed, the link is inferred from the current URL.
3345
+ *
3346
+ * Fails with an error if the email address is invalid or OTP in email link expires.
3347
+ *
3348
+ * This method is not supported by {@link Auth} instances created with a
3349
+ * {@link @firebase/app#FirebaseServerApp}.
3350
+ *
3351
+ * Note: Confirm the link is a sign-in email link before calling this method firebase.auth.Auth.isSignInWithEmailLink.
3352
+ *
3353
+ * @example
3354
+ * ```javascript
3355
+ * const actionCodeSettings = {
3356
+ * url: 'https://www.example.com/?email=user@example.com',
3357
+ * iOS: {
3358
+ * bundleId: 'com.example.ios'
3359
+ * },
3360
+ * android: {
3361
+ * packageName: 'com.example.android',
3362
+ * installApp: true,
3363
+ * minimumVersion: '12'
3364
+ * },
3365
+ * handleCodeInApp: true
3366
+ * };
3367
+ * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);
3368
+ * // Obtain emailLink from the user.
3369
+ * if(isSignInWithEmailLink(auth, emailLink)) {
3370
+ * await signInWithEmailLink(auth, 'user@example.com', emailLink);
3371
+ * }
3372
+ * ```
3373
+ *
3374
+ *
3375
+ * @param auth - The {@link Auth} instance.
3376
+ * @param email - The user's email address.
3377
+ * @param emailLink - The link sent to the user's email address.
3378
+ *
3379
+ * @public
3380
+ */
3381
+ export declare function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise<UserCredential>;
3382
+
3383
+ /**
3384
+ * @internal
3385
+ */
3386
+ declare interface SignInWithIdpResponse extends IdTokenResponse {
3387
+ oauthAccessToken?: string;
3388
+ oauthTokenSecret?: string;
3389
+ nonce?: string;
3390
+ oauthIdToken?: string;
3391
+ pendingToken?: string;
3392
+ }
3393
+
3394
+ /**
3395
+ * @internal
3396
+ */
3397
+ declare interface SignInWithPhoneNumberRequest {
3398
+ temporaryProof?: string;
3399
+ phoneNumber?: string;
3400
+ sessionInfo?: string;
3401
+ code?: string;
3402
+ tenantId?: string;
3403
+ }
3404
+
3405
+ /**
3406
+ * @internal
3407
+ */
3408
+ declare interface SignInWithPhoneNumberResponse extends IdTokenResponse {
3409
+ temporaryProof?: string;
3410
+ phoneNumber?: string;
3411
+ }
3412
+
3413
+ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void>;
3414
+
3415
+ /**
3416
+ * Signs out the current user.
3417
+ *
3418
+ * @remarks
3419
+ * This method is not supported by {@link Auth} instances created with a
3420
+ * {@link @firebase/app#FirebaseServerApp}.
3421
+ *
3422
+ * @param auth - The {@link Auth} instance.
3423
+ *
3424
+ * @public
3425
+ */
3426
+ export declare function signOut(auth: Auth): Promise<void>;
3427
+
3428
+ declare interface StorageEventListener {
3429
+ (value: PersistenceValue | null): void;
3430
+ }
3431
+
3432
+ /**
3433
+ * We need to mark this class as internal explicitly to exclude it in the public typings, because
3434
+ * it references AuthInternal which has a circular dependency with UserInternal.
3435
+ *
3436
+ * @internal
3437
+ */
3438
+ declare class StsTokenManager {
3439
+ refreshToken: string | null;
3440
+ accessToken: string | null;
3441
+ expirationTime: number | null;
3442
+ get isExpired(): boolean;
3443
+ updateFromServerResponse(response: IdTokenResponse | FinalizeMfaResponse): void;
3444
+ updateFromIdToken(idToken: string): void;
3445
+ getToken(auth: AuthInternal, forceRefresh?: boolean): Promise<string | null>;
3446
+ clearRefreshToken(): void;
3447
+ private refresh;
3448
+ private updateTokensAndExpiration;
3449
+ static fromJSON(appName: string, object: PersistedBlob): StsTokenManager;
3450
+ toJSON(): object;
3451
+ _assign(stsTokenManager: StsTokenManager): void;
3452
+ _clone(): StsTokenManager;
3453
+ _performRefresh(): never;
3454
+ }
3455
+
3456
+ /**
3457
+ * @internal
3458
+ */
3459
+ declare interface TaggedWithTokenResponse {
3460
+ _tokenResponse?: PhoneOrOauthTokenResponse;
3461
+ }
3462
+
3463
+ /**
3464
+ * An MFA provided by TOTP (Time-based One Time Password).
3465
+ */
3466
+ declare interface TotpMfaEnrollment extends BaseMfaEnrollment {
3467
+ }
3468
+
3469
+ /**
3470
+ * The class for asserting ownership of a TOTP second factor. Provided by
3471
+ * {@link TotpMultiFactorGenerator.assertionForEnrollment} and
3472
+ * {@link TotpMultiFactorGenerator.assertionForSignIn}.
3473
+ *
3474
+ * @public
3475
+ */
3476
+ export declare interface TotpMultiFactorAssertion extends MultiFactorAssertion {
3477
+ }
3478
+
3479
+ /**
3480
+ * The subclass of the {@link MultiFactorInfo} interface for TOTP
3481
+ * second factors. The `factorId` of this second factor is {@link FactorId}.TOTP.
3482
+ * @public
3483
+ */
3484
+ export declare interface TotpMultiFactorInfo extends MultiFactorInfo {
3485
+ }
3486
+
3487
+ /**
3488
+ * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.TWITTER.
3489
+ *
3490
+ * @example
3491
+ * ```javascript
3492
+ * // Sign in using a redirect.
3493
+ * const provider = new TwitterAuthProvider();
3494
+ * // Start a sign in process for an unauthenticated user.
3495
+ * await signInWithRedirect(auth, provider);
3496
+ * // This will trigger a full page redirect away from your app
3497
+ *
3498
+ * // After returning from the redirect when your app initializes you can obtain the result
3499
+ * const result = await getRedirectResult(auth);
3500
+ * if (result) {
3501
+ * // This is the signed-in user
3502
+ * const user = result.user;
3503
+ * // This gives you a Twitter Access Token and Secret.
3504
+ * const credential = TwitterAuthProvider.credentialFromResult(result);
3505
+ * const token = credential.accessToken;
3506
+ * const secret = credential.secret;
3507
+ * }
3508
+ * ```
3509
+ *
3510
+ * @example
3511
+ * ```javascript
3512
+ * // Sign in using a popup.
3513
+ * const provider = new TwitterAuthProvider();
3514
+ * const result = await signInWithPopup(auth, provider);
3515
+ *
3516
+ * // The signed-in user info.
3517
+ * const user = result.user;
3518
+ * // This gives you a Twitter Access Token and Secret.
3519
+ * const credential = TwitterAuthProvider.credentialFromResult(result);
3520
+ * const token = credential.accessToken;
3521
+ * const secret = credential.secret;
3522
+ * ```
3523
+ *
3524
+ * @public
3525
+ */
3526
+ export declare class TwitterAuthProvider extends BaseOAuthProvider {
3527
+ /** Always set to {@link SignInMethod}.TWITTER. */
3528
+ static readonly TWITTER_SIGN_IN_METHOD: 'twitter.com';
3529
+ /** Always set to {@link ProviderId}.TWITTER. */
3530
+ static readonly PROVIDER_ID: 'twitter.com';
3531
+ constructor();
3532
+ /**
3533
+ * Creates a credential for Twitter.
3534
+ *
3535
+ * @param token - Twitter access token.
3536
+ * @param secret - Twitter secret.
3537
+ */
3538
+ static credential(token: string, secret: string): OAuthCredential;
3539
+ /**
3540
+ * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
3541
+ *
3542
+ * @param userCredential - The user credential.
3543
+ */
3544
+ static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
3545
+ /**
3546
+ * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
3547
+ * thrown during a sign-in, link, or reauthenticate operation.
3548
+ *
3549
+ * @param userCredential - The user credential.
3550
+ */
3551
+ static credentialFromError(error: FirebaseError): OAuthCredential | null;
3552
+ private static credentialFromTaggedObject;
3553
+ }
3554
+
3555
+ /**
3556
+ * Unlinks a provider from a user account.
3557
+ *
3558
+ * @param user - The user.
3559
+ * @param providerId - The provider to unlink.
3560
+ *
3561
+ * @public
3562
+ */
3563
+ export declare function unlink(user: User, providerId: string): Promise<User>;
3564
+ export { Unsubscribe }
3565
+
3566
+ /**
3567
+ * Asynchronously sets the provided user as {@link Auth.currentUser} on the
3568
+ * {@link Auth} instance.
3569
+ *
3570
+ * @remarks
3571
+ * A new instance copy of the user provided will be made and set as currentUser.
3572
+ *
3573
+ * This will trigger {@link onAuthStateChanged} and {@link onIdTokenChanged} listeners
3574
+ * like other sign in methods.
3575
+ *
3576
+ * The operation fails with an error if the user to be updated belongs to a different Firebase
3577
+ * project.
3578
+ *
3579
+ * This method is not supported by {@link Auth} instances created with a
3580
+ * {@link @firebase/app#FirebaseServerApp}.
3581
+ *
3582
+ * @param auth - The {@link Auth} instance.
3583
+ * @param user - The new {@link User}.
3584
+ *
3585
+ * @public
3586
+ */
3587
+ export declare function updateCurrentUser(auth: Auth, user: User | null): Promise<void>;
3588
+
3589
+ /**
3590
+ * Updates the user's email address.
3591
+ *
3592
+ * @remarks
3593
+ * An email will be sent to the original email address (if it was set) that allows to revoke the
3594
+ * email address change, in order to protect them from account hijacking.
3595
+ *
3596
+ * This method is not supported on any {@link User} signed in by {@link Auth} instances
3597
+ * created with a {@link @firebase/app#FirebaseServerApp}.
3598
+ *
3599
+ * Important: this is a security sensitive operation that requires the user to have recently signed
3600
+ * in. If this requirement isn't met, ask the user to authenticate again and then call
3601
+ * {@link reauthenticateWithCredential}.
3602
+ *
3603
+ * @param user - The user.
3604
+ * @param newEmail - The new email address.
3605
+ *
3606
+ * Throws "auth/operation-not-allowed" error when
3607
+ * {@link https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection | Email Enumeration Protection}
3608
+ * is enabled.
3609
+ * Deprecated - Use {@link verifyBeforeUpdateEmail} instead.
3610
+ *
3611
+ * @public
3612
+ */
3613
+ export declare function updateEmail(user: User, newEmail: string): Promise<void>;
3614
+
3615
+ /**
3616
+ * Updates the user's password.
3617
+ *
3618
+ * @remarks
3619
+ * Important: this is a security sensitive operation that requires the user to have recently signed
3620
+ * in. If this requirement isn't met, ask the user to authenticate again and then call
3621
+ * {@link reauthenticateWithCredential}.
3622
+ *
3623
+ * @param user - The user.
3624
+ * @param newPassword - The new password.
3625
+ *
3626
+ * @public
3627
+ */
3628
+ export declare function updatePassword(user: User, newPassword: string): Promise<void>;
3629
+
3630
+ /**
3631
+ * Updates a user's profile data.
3632
+ *
3633
+ * @param user - The user.
3634
+ * @param profile - The profile's `displayName` and `photoURL` to update.
3635
+ *
3636
+ * @public
3637
+ */
3638
+ export declare function updateProfile(user: User, { displayName, photoURL: photoUrl }: {
3639
+ displayName?: string | null;
3640
+ photoURL?: string | null;
3641
+ }): Promise<void>;
3642
+
3643
+ /**
3644
+ * Sets the current language to the default device/browser preference.
3645
+ *
3646
+ * @param auth - The {@link Auth} instance.
3647
+ *
3648
+ * @public
3649
+ */
3650
+ export declare function useDeviceLanguage(auth: Auth): void;
3651
+
3652
+ /**
3653
+ * A user account.
3654
+ *
3655
+ * @public
3656
+ */
3657
+ export declare interface User extends UserInfo {
3658
+ /**
3659
+ * Whether the email has been verified with {@link sendEmailVerification} and
3660
+ * {@link applyActionCode}.
3661
+ */
3662
+ readonly emailVerified: boolean;
3663
+ /**
3664
+ * Whether the user is authenticated using the {@link ProviderId}.ANONYMOUS provider.
3665
+ */
3666
+ readonly isAnonymous: boolean;
3667
+ /**
3668
+ * Additional metadata around user creation and sign-in times.
3669
+ */
3670
+ readonly metadata: UserMetadata;
3671
+ /**
3672
+ * Additional per provider such as displayName and profile information.
3673
+ */
3674
+ readonly providerData: UserInfo[];
3675
+ /**
3676
+ * Refresh token used to reauthenticate the user. Avoid using this directly and prefer
3677
+ * {@link User.getIdToken} to refresh the ID token instead.
3678
+ */
3679
+ readonly refreshToken: string;
3680
+ /**
3681
+ * The user's tenant ID.
3682
+ *
3683
+ * @remarks
3684
+ * This is a read-only property, which indicates the tenant ID
3685
+ * used to sign in the user. This is null if the user is signed in from the parent
3686
+ * project.
3687
+ *
3688
+ * @example
3689
+ * ```javascript
3690
+ * // Set the tenant ID on Auth instance.
3691
+ * auth.tenantId = 'TENANT_PROJECT_ID';
3692
+ *
3693
+ * // All future sign-in request now include tenant ID.
3694
+ * const result = await signInWithEmailAndPassword(auth, email, password);
3695
+ * // result.user.tenantId should be 'TENANT_PROJECT_ID'.
3696
+ * ```
3697
+ */
3698
+ readonly tenantId: string | null;
3699
+ /**
3700
+ * Deletes and signs out the user.
3701
+ *
3702
+ * @remarks
3703
+ * Important: this is a security-sensitive operation that requires the user to have recently
3704
+ * signed in. If this requirement isn't met, ask the user to authenticate again and then call
3705
+ * one of the reauthentication methods like {@link reauthenticateWithCredential}.
3706
+ *
3707
+ * This method is not supported on any {@link User} signed in by {@link Auth} instances
3708
+ * created with a {@link @firebase/app#FirebaseServerApp}.
3709
+ */
3710
+ delete(): Promise<void>;
3711
+ /**
3712
+ * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.
3713
+ *
3714
+ * @remarks
3715
+ * Returns the current token if it has not expired or if it will not expire in the next five
3716
+ * minutes. Otherwise, this will refresh the token and return a new one.
3717
+ *
3718
+ * @param forceRefresh - Force refresh regardless of token expiration.
3719
+ */
3720
+ getIdToken(forceRefresh?: boolean): Promise<string>;
3721
+ /**
3722
+ * Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service.
3723
+ *
3724
+ * @remarks
3725
+ * Returns the current token if it has not expired or if it will not expire in the next five
3726
+ * minutes. Otherwise, this will refresh the token and return a new one.
3727
+ *
3728
+ * @param forceRefresh - Force refresh regardless of token expiration.
3729
+ */
3730
+ getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
3731
+ /**
3732
+ * Refreshes the user, if signed in.
3733
+ */
3734
+ reload(): Promise<void>;
3735
+ /**
3736
+ * Returns a JSON-serializable representation of this object.
3737
+ *
3738
+ * @returns A JSON-serializable representation of this object.
3739
+ */
3740
+ toJSON(): object;
3741
+ }
3742
+
3743
+ /**
3744
+ * A structure containing a {@link User}, the {@link OperationType}, and the provider ID.
3745
+ *
3746
+ * @remarks
3747
+ * `operationType` could be {@link OperationType}.SIGN_IN for a sign-in operation,
3748
+ * {@link OperationType}.LINK for a linking operation and {@link OperationType}.REAUTHENTICATE for
3749
+ * a reauthentication operation.
3750
+ *
3751
+ * @public
3752
+ */
3753
+ export declare interface UserCredential {
3754
+ /**
3755
+ * The user authenticated by this credential.
3756
+ */
3757
+ user: User;
3758
+ /**
3759
+ * The provider which was used to authenticate the user.
3760
+ */
3761
+ providerId: string | null;
3762
+ /**
3763
+ * The type of operation which was used to authenticate the user (such as sign-in or link).
3764
+ */
3765
+ operationType: (typeof OperationType)[keyof typeof OperationType];
3766
+ }
3767
+
3768
+ /**
3769
+ * @internal
3770
+ */
3771
+ declare interface UserCredentialInternal extends UserCredential, TaggedWithTokenResponse {
3772
+ user: UserInternal;
3773
+ }
3774
+
3775
+ /**
3776
+ * User profile information, visible only to the Firebase project's apps.
3777
+ *
3778
+ * @public
3779
+ */
3780
+ export declare interface UserInfo {
3781
+ /**
3782
+ * The display name of the user.
3783
+ */
3784
+ readonly displayName: string | null;
3785
+ /**
3786
+ * The email of the user.
3787
+ */
3788
+ readonly email: string | null;
3789
+ /**
3790
+ * The phone number normalized based on the E.164 standard (e.g. +16505550101) for the
3791
+ * user.
3792
+ *
3793
+ * @remarks
3794
+ * This is null if the user has no phone credential linked to the account.
3795
+ */
3796
+ readonly phoneNumber: string | null;
3797
+ /**
3798
+ * The profile photo URL of the user.
3799
+ */
3800
+ readonly photoURL: string | null;
3801
+ /**
3802
+ * The provider used to authenticate the user.
3803
+ */
3804
+ readonly providerId: string;
3805
+ /**
3806
+ * The user's unique ID, scoped to the project.
3807
+ */
3808
+ readonly uid: string;
3809
+ }
3810
+
3811
+ /**
3812
+ * UserInternal and AuthInternal reference each other, so both of them are included in the public typings.
3813
+ * In order to exclude them, we mark them as internal explicitly.
3814
+ *
3815
+ * @internal
3816
+ */
3817
+ declare interface UserInternal extends User {
3818
+ displayName: string | null;
3819
+ email: string | null;
3820
+ phoneNumber: string | null;
3821
+ photoURL: string | null;
3822
+ auth: AuthInternal;
3823
+ providerId: ProviderId_2.FIREBASE;
3824
+ refreshToken: string;
3825
+ emailVerified: boolean;
3826
+ tenantId: string | null;
3827
+ providerData: MutableUserInfo[];
3828
+ metadata: UserMetadata_2;
3829
+ stsTokenManager: StsTokenManager;
3830
+ _redirectEventId?: string;
3831
+ _updateTokensIfNecessary(response: IdTokenResponse | FinalizeMfaResponse, reload?: boolean): Promise<void>;
3832
+ _assign(user: UserInternal): void;
3833
+ _clone(auth: AuthInternal): UserInternal;
3834
+ _onReload: (cb: NextFn<APIUserInfo>) => void;
3835
+ _notifyReloadListener: NextFn<APIUserInfo>;
3836
+ _startProactiveRefresh: () => void;
3837
+ _stopProactiveRefresh: () => void;
3838
+ getIdToken(forceRefresh?: boolean): Promise<string>;
3839
+ getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
3840
+ reload(): Promise<void>;
3841
+ delete(): Promise<void>;
3842
+ toJSON(): PersistedBlob;
3843
+ }
3844
+
3845
+ /**
3846
+ * Interface representing a user's metadata.
3847
+ *
3848
+ * @public
3849
+ */
3850
+ export declare interface UserMetadata {
3851
+ /** Time the user was created. */
3852
+ readonly creationTime?: string;
3853
+ /** Time the user last signed in. */
3854
+ readonly lastSignInTime?: string;
3855
+ }
3856
+
3857
+ declare class UserMetadata_2 implements UserMetadata {
3858
+ private createdAt?;
3859
+ private lastLoginAt?;
3860
+ creationTime?: string;
3861
+ lastSignInTime?: string;
3862
+ constructor(createdAt?: (string | number) | undefined, lastLoginAt?: (string | number) | undefined);
3863
+ private _initializeTime;
3864
+ _copy(metadata: UserMetadata_2): void;
3865
+ toJSON(): object;
3866
+ }
3867
+
3868
+ /**
3869
+ * User profile used in {@link AdditionalUserInfo}.
3870
+ *
3871
+ * @public
3872
+ */
3873
+ export declare type UserProfile = Record<string, unknown>;
3874
+
3875
+ /**
3876
+ * Validates the password against the password policy configured for the project or tenant.
3877
+ *
3878
+ * @remarks
3879
+ * If no tenant ID is set on the `Auth` instance, then this method will use the password
3880
+ * policy configured for the project. Otherwise, this method will use the policy configured
3881
+ * for the tenant. If a password policy has not been configured, then the default policy
3882
+ * configured for all projects will be used.
3883
+ *
3884
+ * If an auth flow fails because a submitted password does not meet the password policy
3885
+ * requirements and this method has previously been called, then this method will use the
3886
+ * most recent policy available when called again.
3887
+ *
3888
+ * @example
3889
+ * ```javascript
3890
+ * validatePassword(auth, 'some-password');
3891
+ * ```
3892
+ *
3893
+ * @param auth The {@link Auth} instance.
3894
+ * @param password The password to validate.
3895
+ *
3896
+ * @public
3897
+ */
3898
+ export declare function validatePassword(auth: Auth, password: string): Promise<PasswordValidationStatus>;
3899
+
3900
+ /**
3901
+ * Sends a verification email to a new email address.
3902
+ *
3903
+ * @remarks
3904
+ * The user's email will be updated to the new one after being verified.
3905
+ *
3906
+ * If you have a custom email action handler, you can complete the verification process by calling
3907
+ * {@link applyActionCode}.
3908
+ *
3909
+ * @example
3910
+ * ```javascript
3911
+ * const actionCodeSettings = {
3912
+ * url: 'https://www.example.com/?email=user@example.com',
3913
+ * iOS: {
3914
+ * bundleId: 'com.example.ios'
3915
+ * },
3916
+ * android: {
3917
+ * packageName: 'com.example.android',
3918
+ * installApp: true,
3919
+ * minimumVersion: '12'
3920
+ * },
3921
+ * handleCodeInApp: true
3922
+ * };
3923
+ * await verifyBeforeUpdateEmail(user, 'newemail@example.com', actionCodeSettings);
3924
+ * // Obtain code from the user.
3925
+ * await applyActionCode(auth, code);
3926
+ * ```
3927
+ *
3928
+ * @param user - The user.
3929
+ * @param newEmail - The new email address to be verified before update.
3930
+ * @param actionCodeSettings - The {@link ActionCodeSettings}.
3931
+ *
3932
+ * @public
3933
+ */
3934
+ export declare function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
3935
+
3936
+ /**
3937
+ * Checks a password reset code sent to the user by email or other out-of-band mechanism.
3938
+ *
3939
+ * @returns the user's email address if valid.
3940
+ *
3941
+ * @param auth - The {@link Auth} instance.
3942
+ * @param code - A verification code sent to the user.
3943
+ *
3944
+ * @public
3945
+ */
3946
+ export declare function verifyPasswordResetCode(auth: Auth, code: string): Promise<string>;
3947
+
3948
+ export { }