@depup/firebase__auth 1.12.1-depup.0

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