@firebase/auth 0.21.1 → 0.21.2-20230201003102
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.
- package/CHANGELOG.md +13 -0
- package/dist/auth-public.d.ts +8 -4
- package/dist/auth.d.ts +8 -4
- package/dist/browser-cjs/index-09687647.js +9642 -0
- package/dist/browser-cjs/index-09687647.js.map +1 -0
- package/dist/browser-cjs/index.cordova.d.ts +32 -0
- package/dist/browser-cjs/index.d.ts +36 -0
- package/dist/browser-cjs/index.doc.d.ts +24 -0
- package/dist/browser-cjs/index.js +93 -0
- package/dist/browser-cjs/index.js.map +1 -0
- package/dist/browser-cjs/index.node.d.ts +17 -0
- package/dist/browser-cjs/index.rn.d.ts +32 -0
- package/dist/browser-cjs/index.shared.d.ts +19 -0
- package/dist/browser-cjs/index.webworker.d.ts +21 -0
- package/dist/browser-cjs/internal/index.d.ts +42 -0
- package/dist/browser-cjs/internal.js +667 -0
- package/dist/browser-cjs/internal.js.map +1 -0
- package/dist/browser-cjs/scripts/run_node_tests.d.ts +17 -0
- package/dist/browser-cjs/src/api/account_management/account.d.ts +59 -0
- package/dist/browser-cjs/src/api/account_management/account.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/account_management/email_and_password.d.ts +47 -0
- package/dist/browser-cjs/src/api/account_management/email_and_password.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/account_management/mfa.d.ts +69 -0
- package/dist/browser-cjs/src/api/account_management/mfa.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/account_management/profile.d.ts +29 -0
- package/dist/browser-cjs/src/api/account_management/profile.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/create_auth_uri.d.ts +26 -0
- package/dist/browser-cjs/src/api/authentication/create_auth_uri.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/custom_token.d.ts +26 -0
- package/dist/browser-cjs/src/api/authentication/custom_token.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/email_and_password.d.ts +76 -0
- package/dist/browser-cjs/src/api/authentication/email_and_password.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/email_link.d.ts +32 -0
- package/dist/browser-cjs/src/api/authentication/email_link.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/idp.d.ts +40 -0
- package/dist/browser-cjs/src/api/authentication/idp.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/mfa.d.ts +58 -0
- package/dist/browser-cjs/src/api/authentication/mfa.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/recaptcha.d.ts +18 -0
- package/dist/browser-cjs/src/api/authentication/recaptcha.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/sign_up.d.ts +29 -0
- package/dist/browser-cjs/src/api/authentication/sign_up.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/sms.d.ts +50 -0
- package/dist/browser-cjs/src/api/authentication/sms.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/authentication/token.d.ts +26 -0
- package/dist/browser-cjs/src/api/authentication/token.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/errors.d.ts +118 -0
- package/dist/browser-cjs/src/api/index.d.ts +69 -0
- package/dist/browser-cjs/src/api/index.test.d.ts +17 -0
- package/dist/browser-cjs/src/api/project_config/get_project_config.d.ts +25 -0
- package/dist/browser-cjs/src/api/project_config/get_project_config.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/action_code_url.d.ts +73 -0
- package/dist/browser-cjs/src/core/action_code_url.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/auth_event_manager.d.ts +34 -0
- package/dist/browser-cjs/src/core/auth/auth_event_manager.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/auth_impl.d.ts +110 -0
- package/dist/browser-cjs/src/core/auth/auth_impl.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/emulator.d.ts +42 -0
- package/dist/browser-cjs/src/core/auth/emulator.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/firebase_internal.d.ts +35 -0
- package/dist/browser-cjs/src/core/auth/firebase_internal.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/initialize.d.ts +46 -0
- package/dist/browser-cjs/src/core/auth/initialize.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/middleware.d.ts +25 -0
- package/dist/browser-cjs/src/core/auth/middleware.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/auth/register.d.ts +23 -0
- package/dist/browser-cjs/src/core/credentials/auth_credential.d.ts +75 -0
- package/dist/browser-cjs/src/core/credentials/email.d.ts +60 -0
- package/dist/browser-cjs/src/core/credentials/email.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/credentials/index.d.ts +23 -0
- package/dist/browser-cjs/src/core/credentials/oauth.d.ts +81 -0
- package/dist/browser-cjs/src/core/credentials/oauth.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/credentials/phone.d.ts +52 -0
- package/dist/browser-cjs/src/core/credentials/phone.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/credentials/saml.d.ts +52 -0
- package/dist/browser-cjs/src/core/credentials/saml.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/errors.d.ts +305 -0
- package/dist/browser-cjs/src/core/errors.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/index.d.ts +158 -0
- package/dist/browser-cjs/src/core/persistence/in_memory.d.ts +35 -0
- package/dist/browser-cjs/src/core/persistence/in_memory.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/persistence/index.d.ts +41 -0
- package/dist/browser-cjs/src/core/persistence/persistence_user_manager.d.ts +45 -0
- package/dist/browser-cjs/src/core/persistence/persistence_user_manager.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/email.d.ts +83 -0
- package/dist/browser-cjs/src/core/providers/email.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/facebook.d.ts +93 -0
- package/dist/browser-cjs/src/core/providers/facebook.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/federated.d.ts +64 -0
- package/dist/browser-cjs/src/core/providers/federated.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/github.d.ts +89 -0
- package/dist/browser-cjs/src/core/providers/github.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/google.d.ts +96 -0
- package/dist/browser-cjs/src/core/providers/google.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/oauth.d.ts +151 -0
- package/dist/browser-cjs/src/core/providers/oauth.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/saml.d.ts +62 -0
- package/dist/browser-cjs/src/core/providers/saml.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/providers/twitter.d.ts +103 -0
- package/dist/browser-cjs/src/core/providers/twitter.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/abstract_popup_redirect_operation.d.ts +44 -0
- package/dist/browser-cjs/src/core/strategies/abstract_popup_redirect_operation.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/action_code_settings.d.ts +19 -0
- package/dist/browser-cjs/src/core/strategies/action_code_settings.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/anonymous.d.ts +29 -0
- package/dist/browser-cjs/src/core/strategies/anonymous.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/credential.d.ts +58 -0
- package/dist/browser-cjs/src/core/strategies/credential.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/custom_token.d.ts +34 -0
- package/dist/browser-cjs/src/core/strategies/custom_token.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/email.d.ts +98 -0
- package/dist/browser-cjs/src/core/strategies/email.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/email_and_password.d.ts +126 -0
- package/dist/browser-cjs/src/core/strategies/email_and_password.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/email_link.d.ts +103 -0
- package/dist/browser-cjs/src/core/strategies/email_link.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/idp.d.ts +32 -0
- package/dist/browser-cjs/src/core/strategies/idp.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/strategies/redirect.d.ts +36 -0
- package/dist/browser-cjs/src/core/strategies/redirect.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/account_info.d.ts +60 -0
- package/dist/browser-cjs/src/core/user/account_info.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/additional_user_info.d.ts +31 -0
- package/dist/browser-cjs/src/core/user/additional_user_info.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/id_token_result.d.ts +48 -0
- package/dist/browser-cjs/src/core/user/id_token_result.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/invalidation.d.ts +18 -0
- package/dist/browser-cjs/src/core/user/invalidation.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/link_unlink.d.ts +30 -0
- package/dist/browser-cjs/src/core/user/link_unlink.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/proactive_refresh.d.ts +34 -0
- package/dist/browser-cjs/src/core/user/proactive_refresh.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/reauthenticate.d.ts +20 -0
- package/dist/browser-cjs/src/core/user/reauthenticate.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/reload.d.ts +27 -0
- package/dist/browser-cjs/src/core/user/reload.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/token_manager.d.ts +49 -0
- package/dist/browser-cjs/src/core/user/token_manager.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/user_credential_impl.d.ts +37 -0
- package/dist/browser-cjs/src/core/user/user_credential_impl.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/user_impl.d.ts +68 -0
- package/dist/browser-cjs/src/core/user/user_impl.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/user/user_metadata.d.ts +27 -0
- package/dist/browser-cjs/src/core/util/assert.d.ts +93 -0
- package/dist/browser-cjs/src/core/util/assert.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/browser.d.ts +50 -0
- package/dist/browser-cjs/src/core/util/browser.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/delay.d.ts +31 -0
- package/dist/browser-cjs/src/core/util/delay.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/emulator.d.ts +18 -0
- package/dist/browser-cjs/src/core/util/emulator.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/event_id.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/event_id.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/fetch_provider.d.ts +25 -0
- package/dist/browser-cjs/src/core/util/handler.d.ts +20 -0
- package/dist/browser-cjs/src/core/util/instantiator.d.ts +28 -0
- package/dist/browser-cjs/src/core/util/instantiator.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/location.d.ts +19 -0
- package/dist/browser-cjs/src/core/util/log.d.ts +22 -0
- package/dist/browser-cjs/src/core/util/navigator.d.ts +21 -0
- package/dist/browser-cjs/src/core/util/providers.d.ts +23 -0
- package/dist/browser-cjs/src/core/util/resolver.d.ts +25 -0
- package/dist/browser-cjs/src/core/util/time.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/validate_origin.d.ts +18 -0
- package/dist/browser-cjs/src/core/util/validate_origin.test.d.ts +17 -0
- package/dist/browser-cjs/src/core/util/version.d.ts +30 -0
- package/dist/browser-cjs/src/core/util/version.test.d.ts +17 -0
- package/dist/browser-cjs/src/index.d.ts +18 -0
- package/dist/browser-cjs/src/mfa/index.d.ts +18 -0
- package/dist/browser-cjs/src/mfa/mfa_assertion.d.ts +27 -0
- package/dist/browser-cjs/src/mfa/mfa_error.d.ts +35 -0
- package/dist/browser-cjs/src/mfa/mfa_info.d.ts +32 -0
- package/dist/browser-cjs/src/mfa/mfa_info.test.d.ts +17 -0
- package/dist/browser-cjs/src/mfa/mfa_resolver.d.ts +41 -0
- package/dist/browser-cjs/src/mfa/mfa_resolver.test.d.ts +17 -0
- package/dist/browser-cjs/src/mfa/mfa_session.d.ts +39 -0
- package/dist/browser-cjs/src/mfa/mfa_session.test.d.ts +17 -0
- package/dist/browser-cjs/src/mfa/mfa_user.d.ts +38 -0
- package/dist/browser-cjs/src/mfa/mfa_user.test.d.ts +17 -0
- package/dist/browser-cjs/src/model/application_verifier.d.ts +23 -0
- package/dist/browser-cjs/src/model/auth.d.ts +75 -0
- package/dist/browser-cjs/src/model/enum_maps.d.ts +97 -0
- package/dist/browser-cjs/src/model/enums.d.ts +74 -0
- package/dist/browser-cjs/src/model/id_token.d.ts +87 -0
- package/dist/browser-cjs/src/model/popup_redirect.d.ts +94 -0
- package/dist/browser-cjs/src/model/public_types.d.ts +1162 -0
- package/dist/browser-cjs/src/model/user.d.ts +83 -0
- package/dist/browser-cjs/src/platform_browser/auth.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/auth_window.d.ts +37 -0
- package/dist/browser-cjs/src/platform_browser/iframe/gapi.d.ts +19 -0
- package/dist/browser-cjs/src/platform_browser/iframe/gapi.iframes.d.ts +47 -0
- package/dist/browser-cjs/src/platform_browser/iframe/gapi.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/iframe/iframe.d.ts +18 -0
- package/dist/browser-cjs/src/platform_browser/iframe/iframe.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/index.d.ts +27 -0
- package/dist/browser-cjs/src/platform_browser/load_js.d.ts +18 -0
- package/dist/browser-cjs/src/platform_browser/load_js.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/index.d.ts +87 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/promise.d.ts +33 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/promise.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/receiver.d.ts +63 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/receiver.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/sender.d.ts +46 -0
- package/dist/browser-cjs/src/platform_browser/messagechannel/sender.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/mfa/assertions/phone.d.ts +56 -0
- package/dist/browser-cjs/src/platform_browser/mfa/assertions/phone.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/persistence/browser.d.ts +27 -0
- package/dist/browser-cjs/src/platform_browser/persistence/browser.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/persistence/indexed_db.d.ts +33 -0
- package/dist/browser-cjs/src/platform_browser/persistence/indexed_db.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/persistence/local_storage.d.ts +25 -0
- package/dist/browser-cjs/src/platform_browser/persistence/local_storage.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/persistence/session_storage.d.ts +24 -0
- package/dist/browser-cjs/src/platform_browser/persistence/session_storage.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/popup_redirect.d.ts +24 -0
- package/dist/browser-cjs/src/platform_browser/popup_redirect.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/providers/phone.d.ts +149 -0
- package/dist/browser-cjs/src/platform_browser/providers/phone.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +23 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_loader.d.ts +49 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_loader.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_mock.d.ts +51 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_mock.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +90 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_verifier.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/strategies/phone.d.ts +98 -0
- package/dist/browser-cjs/src/platform_browser/strategies/phone.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/strategies/popup.d.ts +103 -0
- package/dist/browser-cjs/src/platform_browser/strategies/popup.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/strategies/redirect.d.ts +165 -0
- package/dist/browser-cjs/src/platform_browser/strategies/redirect.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/util/popup.d.ts +24 -0
- package/dist/browser-cjs/src/platform_browser/util/popup.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_browser/util/worker.d.ts +20 -0
- package/dist/browser-cjs/src/platform_cordova/plugins.d.ts +42 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/events.d.ts +39 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/events.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/popup_redirect.d.ts +24 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/popup_redirect.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/utils.d.ts +47 -0
- package/dist/browser-cjs/src/platform_cordova/popup_redirect/utils.test.d.ts +17 -0
- package/dist/browser-cjs/src/platform_cordova/strategies/redirect.d.ts +20 -0
- package/dist/browser-cjs/src/platform_node/index.d.ts +49 -0
- package/dist/browser-cjs/src/platform_react_native/persistence/react_native.d.ts +25 -0
- package/dist/browser-cjs/src/platform_react_native/persistence/react_native.test.d.ts +17 -0
- package/dist/browser-cjs/test/helpers/api/helper.d.ts +20 -0
- package/dist/browser-cjs/test/helpers/delay.d.ts +20 -0
- package/dist/browser-cjs/test/helpers/erroring_unavailable_persistence.d.ts +36 -0
- package/dist/browser-cjs/test/helpers/fake_service_worker.d.ts +22 -0
- package/dist/browser-cjs/test/helpers/id_token_response.d.ts +18 -0
- package/dist/browser-cjs/test/helpers/iframe_event.d.ts +19 -0
- package/dist/browser-cjs/test/helpers/integration/emulator_rest_helpers.d.ts +35 -0
- package/dist/browser-cjs/test/helpers/integration/helpers.d.ts +20 -0
- package/dist/browser-cjs/test/helpers/integration/settings.d.ts +23 -0
- package/dist/browser-cjs/test/helpers/jwt.d.ts +17 -0
- package/dist/browser-cjs/test/helpers/mock_auth.d.ts +42 -0
- package/dist/browser-cjs/test/helpers/mock_auth_credential.d.ts +31 -0
- package/dist/browser-cjs/test/helpers/mock_fetch.d.ts +30 -0
- package/dist/browser-cjs/test/helpers/mock_fetch.test.d.ts +17 -0
- package/dist/browser-cjs/test/helpers/mock_popup_redirect_resolver.d.ts +24 -0
- package/dist/browser-cjs/test/helpers/redirect_persistence.d.ts +24 -0
- package/dist/browser-cjs/test/helpers/timeout_stub.d.ts +34 -0
- package/dist/browser-cjs/test/integration/flows/anonymous.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/flows/custom.local.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/flows/email.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/flows/idp.local.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/flows/middleware_test_generator.d.ts +18 -0
- package/dist/browser-cjs/test/integration/flows/oob.local.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/flows/phone.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/anonymous.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/compat/firebaseui.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/persistence.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/popup.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/redirect.test.d.ts +17 -0
- package/dist/browser-cjs/test/integration/webdriver/util/auth_driver.d.ts +46 -0
- package/dist/browser-cjs/test/integration/webdriver/util/functions.d.ts +81 -0
- package/dist/browser-cjs/test/integration/webdriver/util/idp_page.d.ts +31 -0
- package/dist/browser-cjs/test/integration/webdriver/util/js_load_condition.d.ts +25 -0
- package/dist/browser-cjs/test/integration/webdriver/util/test_runner.d.ts +19 -0
- package/dist/browser-cjs/test/integration/webdriver/util/test_server.d.ts +27 -0
- package/dist/browser-cjs/test/integration/webdriver/util/ui_page.d.ts +33 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-f2a91123.js → popup_redirect-25d75288.js} +16 -15
- package/dist/cordova/popup_redirect-25d75288.js.map +1 -0
- package/dist/cordova/src/core/strategies/credential.d.ts +2 -1
- package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/esm2017/{index-e5b3cc81.js → index-b10e00ad.js} +22 -20
- package/dist/esm2017/index-b10e00ad.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/core/strategies/credential.d.ts +2 -1
- package/dist/esm2017/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/esm5/{index-624a9c08.js → index-c2c7ec8a.js} +16 -15
- package/dist/esm5/index-c2c7ec8a.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/core/strategies/credential.d.ts +2 -1
- package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/index.webworker.esm5.js +9 -11
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/{index-69e083b1.js → index-173e1445.js} +10 -12
- package/dist/node/{index-69e083b1.js.map → index-173e1445.js.map} +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/core/strategies/credential.d.ts +2 -1
- package/dist/node/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/node-esm/{index-67ff6dfa.js → index-d3f6ac28.js} +16 -17
- package/dist/node-esm/{index-67ff6dfa.js.map → index-d3f6ac28.js.map} +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/src/core/strategies/credential.d.ts +2 -1
- package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +7 -4
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/{phone-ec5655af.js → phone-d07e6704.js} +10 -12
- package/dist/rn/phone-d07e6704.js.map +1 -0
- package/dist/rn/src/core/strategies/credential.d.ts +2 -1
- package/dist/rn/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/dist/src/core/strategies/credential.d.ts +2 -1
- package/dist/src/platform_browser/strategies/redirect.d.ts +6 -3
- package/package.json +15 -7
- package/dist/cordova/popup_redirect-f2a91123.js.map +0 -1
- package/dist/esm2017/index-e5b3cc81.js.map +0 -1
- package/dist/esm5/index-624a9c08.js.map +0 -1
- package/dist/rn/phone-ec5655af.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { User } from '../../model/public_types';
|
|
18
|
+
/**
|
|
19
|
+
* Updates a user's profile data.
|
|
20
|
+
*
|
|
21
|
+
* @param user - The user.
|
|
22
|
+
* @param profile - The profile's `displayName` and `photoURL` to update.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare function updateProfile(user: User, { displayName, photoURL: photoUrl }: {
|
|
27
|
+
displayName?: string | null;
|
|
28
|
+
photoURL?: string | null;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates the user's email address.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* An email will be sent to the original email address (if it was set) that allows to revoke the
|
|
35
|
+
* email address change, in order to protect them from account hijacking.
|
|
36
|
+
*
|
|
37
|
+
* Important: this is a security sensitive operation that requires the user to have recently signed
|
|
38
|
+
* in. If this requirement isn't met, ask the user to authenticate again and then call
|
|
39
|
+
* {@link reauthenticateWithCredential}.
|
|
40
|
+
*
|
|
41
|
+
* @param user - The user.
|
|
42
|
+
* @param newEmail - The new email address.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare function updateEmail(user: User, newEmail: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Updates the user's password.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Important: this is a security sensitive operation that requires the user to have recently signed
|
|
52
|
+
* in. If this requirement isn't met, ask the user to authenticate again and then call
|
|
53
|
+
* {@link reauthenticateWithCredential}.
|
|
54
|
+
*
|
|
55
|
+
* @param user - The user.
|
|
56
|
+
* @param newPassword - The new password.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export declare function updatePassword(user: User, newPassword: string): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { AdditionalUserInfo, UserCredential } from '../../model/public_types';
|
|
18
|
+
import { IdTokenResponse } from '../../model/id_token';
|
|
19
|
+
/**
|
|
20
|
+
* Parse the `AdditionalUserInfo` from the ID token response.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare function _fromIdTokenResponse(idTokenResponse?: IdTokenResponse): AdditionalUserInfo | null;
|
|
24
|
+
/**
|
|
25
|
+
* Extracts provider specific {@link AdditionalUserInfo} for the given credential.
|
|
26
|
+
*
|
|
27
|
+
* @param userCredential - The user credential.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { IdTokenResult, ParsedToken, User } from '../../model/public_types';
|
|
18
|
+
/**
|
|
19
|
+
* Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Returns the current token if it has not expired or if it will not expire in the next five
|
|
23
|
+
* minutes. Otherwise, this will refresh the token and return a new one.
|
|
24
|
+
*
|
|
25
|
+
* @param user - The user.
|
|
26
|
+
* @param forceRefresh - Force refresh regardless of token expiration.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare function getIdToken(user: User, forceRefresh?: boolean): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a deserialized JSON Web Token (JWT) used to identitfy the user to a Firebase service.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Returns the current token if it has not expired or if it will not expire in the next five
|
|
36
|
+
* minutes. Otherwise, this will refresh the token and return a new one.
|
|
37
|
+
*
|
|
38
|
+
* @param user - The user.
|
|
39
|
+
* @param forceRefresh - Force refresh regardless of token expiration.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare function getIdTokenResult(user: User, forceRefresh?: boolean): Promise<IdTokenResult>;
|
|
44
|
+
export declare function _parseToken(token: string): ParsedToken | null;
|
|
45
|
+
/**
|
|
46
|
+
* Extract expiresIn TTL from a token by subtracting the expiration from the issuance.
|
|
47
|
+
*/
|
|
48
|
+
export declare function _tokenExpiresIn(token: string): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { UserInternal } from '../../model/user';
|
|
18
|
+
export declare function _logoutIfInvalidated<T>(user: UserInternal, promise: Promise<T>, bypassAuthState?: boolean): Promise<T>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { User } from '../../model/public_types';
|
|
18
|
+
import { UserInternal, UserCredentialInternal } from '../../model/user';
|
|
19
|
+
import { AuthCredential } from '../credentials';
|
|
20
|
+
/**
|
|
21
|
+
* Unlinks a provider from a user account.
|
|
22
|
+
*
|
|
23
|
+
* @param user - The user.
|
|
24
|
+
* @param providerId - The provider to unlink.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare function unlink(user: User, providerId: string): Promise<User>;
|
|
29
|
+
export declare function _link(user: UserInternal, credential: AuthCredential, bypassAuthState?: boolean): Promise<UserCredentialInternal>;
|
|
30
|
+
export declare function _assertLinkedStatus(expected: boolean, user: UserInternal, provider: string): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { UserInternal } from '../../model/user';
|
|
18
|
+
export declare const enum Duration {
|
|
19
|
+
OFFSET = 300000,
|
|
20
|
+
RETRY_BACKOFF_MIN = 30000,
|
|
21
|
+
RETRY_BACKOFF_MAX = 960000
|
|
22
|
+
}
|
|
23
|
+
export declare class ProactiveRefresh {
|
|
24
|
+
private readonly user;
|
|
25
|
+
private isRunning;
|
|
26
|
+
private timerId;
|
|
27
|
+
private errorBackoff;
|
|
28
|
+
constructor(user: UserInternal);
|
|
29
|
+
_start(): void;
|
|
30
|
+
_stop(): void;
|
|
31
|
+
private getInterval;
|
|
32
|
+
private schedule;
|
|
33
|
+
private iteration;
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { UserInternal } from '../../model/user';
|
|
18
|
+
import { AuthCredential } from '../credentials';
|
|
19
|
+
import { UserCredentialImpl } from './user_credential_impl';
|
|
20
|
+
export declare function _reauthenticate(user: UserInternal, credential: AuthCredential, bypassAuthState?: boolean): Promise<UserCredentialImpl>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { User } from '../../model/public_types';
|
|
18
|
+
import { UserInternal } from '../../model/user';
|
|
19
|
+
export declare function _reloadWithoutSaving(user: UserInternal): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Reloads user account data, if signed in.
|
|
22
|
+
*
|
|
23
|
+
* @param user - The user.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare function reload(user: User): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FinalizeMfaResponse } from '../../api/authentication/mfa';
|
|
18
|
+
import { AuthInternal } from '../../model/auth';
|
|
19
|
+
import { IdTokenResponse } from '../../model/id_token';
|
|
20
|
+
import { PersistedBlob } from '../persistence';
|
|
21
|
+
/**
|
|
22
|
+
* The number of milliseconds before the official expiration time of a token
|
|
23
|
+
* to refresh that token, to provide a buffer for RPCs to complete.
|
|
24
|
+
*/
|
|
25
|
+
export declare const enum Buffer {
|
|
26
|
+
TOKEN_REFRESH = 30000
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* We need to mark this class as internal explicitly to exclude it in the public typings, because
|
|
30
|
+
* it references AuthInternal which has a circular dependency with UserInternal.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare class StsTokenManager {
|
|
35
|
+
refreshToken: string | null;
|
|
36
|
+
accessToken: string | null;
|
|
37
|
+
expirationTime: number | null;
|
|
38
|
+
get isExpired(): boolean;
|
|
39
|
+
updateFromServerResponse(response: IdTokenResponse | FinalizeMfaResponse): void;
|
|
40
|
+
getToken(auth: AuthInternal, forceRefresh?: boolean): Promise<string | null>;
|
|
41
|
+
clearRefreshToken(): void;
|
|
42
|
+
private refresh;
|
|
43
|
+
private updateTokensAndExpiration;
|
|
44
|
+
static fromJSON(appName: string, object: PersistedBlob): StsTokenManager;
|
|
45
|
+
toJSON(): object;
|
|
46
|
+
_assign(stsTokenManager: StsTokenManager): void;
|
|
47
|
+
_clone(): StsTokenManager;
|
|
48
|
+
_performRefresh(): never;
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { PhoneOrOauthTokenResponse } from '../../api/authentication/mfa';
|
|
18
|
+
import { IdTokenResponse } from '../../model/id_token';
|
|
19
|
+
import { UserInternal, UserCredentialInternal } from '../../model/user';
|
|
20
|
+
import { AuthInternal } from '../../model/auth';
|
|
21
|
+
import { OperationType, ProviderId } from '../../model/enums';
|
|
22
|
+
interface UserCredentialParams {
|
|
23
|
+
readonly user: UserInternal;
|
|
24
|
+
readonly providerId: ProviderId | string | null;
|
|
25
|
+
readonly _tokenResponse?: PhoneOrOauthTokenResponse;
|
|
26
|
+
readonly operationType: OperationType;
|
|
27
|
+
}
|
|
28
|
+
export declare class UserCredentialImpl implements UserCredentialInternal, UserCredentialParams {
|
|
29
|
+
readonly user: UserInternal;
|
|
30
|
+
readonly providerId: ProviderId | string | null;
|
|
31
|
+
readonly _tokenResponse: PhoneOrOauthTokenResponse | undefined;
|
|
32
|
+
readonly operationType: OperationType;
|
|
33
|
+
constructor(params: UserCredentialParams);
|
|
34
|
+
static _fromIdTokenResponse(auth: AuthInternal, operationType: OperationType, idTokenResponse: IdTokenResponse, isAnonymous?: boolean): Promise<UserCredentialInternal>;
|
|
35
|
+
static _forOperation(user: UserInternal, operationType: OperationType, response: PhoneOrOauthTokenResponse): Promise<UserCredentialImpl>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { IdTokenResult } from '../../model/public_types';
|
|
18
|
+
import { NextFn } from '@firebase/util';
|
|
19
|
+
import { APIUserInfo } from '../../api/account_management/account';
|
|
20
|
+
import { FinalizeMfaResponse } from '../../api/authentication/mfa';
|
|
21
|
+
import { AuthInternal } from '../../model/auth';
|
|
22
|
+
import { IdTokenResponse } from '../../model/id_token';
|
|
23
|
+
import { MutableUserInfo, UserInternal, UserParameters } from '../../model/user';
|
|
24
|
+
import { PersistedBlob } from '../persistence';
|
|
25
|
+
import { StsTokenManager } from './token_manager';
|
|
26
|
+
import { UserMetadata } from './user_metadata';
|
|
27
|
+
import { ProviderId } from '../../model/enums';
|
|
28
|
+
export declare class UserImpl implements UserInternal {
|
|
29
|
+
readonly providerId = ProviderId.FIREBASE;
|
|
30
|
+
stsTokenManager: StsTokenManager;
|
|
31
|
+
private accessToken;
|
|
32
|
+
uid: string;
|
|
33
|
+
auth: AuthInternal;
|
|
34
|
+
emailVerified: boolean;
|
|
35
|
+
isAnonymous: boolean;
|
|
36
|
+
tenantId: string | null;
|
|
37
|
+
readonly metadata: UserMetadata;
|
|
38
|
+
providerData: MutableUserInfo[];
|
|
39
|
+
displayName: string | null;
|
|
40
|
+
email: string | null;
|
|
41
|
+
phoneNumber: string | null;
|
|
42
|
+
photoURL: string | null;
|
|
43
|
+
_redirectEventId?: string;
|
|
44
|
+
private readonly proactiveRefresh;
|
|
45
|
+
constructor({ uid, auth, stsTokenManager, ...opt }: UserParameters);
|
|
46
|
+
getIdToken(forceRefresh?: boolean): Promise<string>;
|
|
47
|
+
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
|
|
48
|
+
reload(): Promise<void>;
|
|
49
|
+
private reloadUserInfo;
|
|
50
|
+
private reloadListener;
|
|
51
|
+
_assign(user: UserInternal): void;
|
|
52
|
+
_clone(auth: AuthInternal): UserInternal;
|
|
53
|
+
_onReload(callback: NextFn<APIUserInfo>): void;
|
|
54
|
+
_notifyReloadListener(userInfo: APIUserInfo): void;
|
|
55
|
+
_startProactiveRefresh(): void;
|
|
56
|
+
_stopProactiveRefresh(): void;
|
|
57
|
+
_updateTokensIfNecessary(response: IdTokenResponse | FinalizeMfaResponse, reload?: boolean): Promise<void>;
|
|
58
|
+
delete(): Promise<void>;
|
|
59
|
+
toJSON(): PersistedBlob;
|
|
60
|
+
get refreshToken(): string;
|
|
61
|
+
static _fromJSON(auth: AuthInternal, object: PersistedBlob): UserInternal;
|
|
62
|
+
/**
|
|
63
|
+
* Initialize a User from an idToken server response
|
|
64
|
+
* @param auth
|
|
65
|
+
* @param idTokenResponse
|
|
66
|
+
*/
|
|
67
|
+
static _fromIdTokenResponse(auth: AuthInternal, idTokenResponse: IdTokenResponse, isAnonymous?: boolean): Promise<UserInternal>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|