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