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