@firebase/auth 1.7.9 → 1.8.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.
- package/README.md +32 -1
- package/dist/auth-public.d.ts +22 -10
- package/dist/auth.d.ts +22 -10
- package/dist/browser-cjs/{index-e2e765e6.js → index-b60d3212.js} +393 -176
- package/dist/browser-cjs/index-b60d3212.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/api/account_management/mfa.d.ts +5 -1
- package/dist/browser-cjs/src/api/authentication/mfa.d.ts +5 -1
- package/dist/browser-cjs/src/api/authentication/sms.d.ts +5 -1
- package/dist/browser-cjs/src/api/index.d.ts +7 -3
- package/dist/browser-cjs/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/browser-cjs/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/cordova/auth-cordova-public.d.ts +7 -0
- package/dist/cordova/auth-cordova.d.ts +7 -0
- package/dist/cordova/index.js +6 -7
- package/dist/cordova/index.js.map +1 -1
- package/dist/cordova/internal.js +660 -985
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/popup_redirect-6fcd583a.js +9635 -0
- package/dist/cordova/popup_redirect-6fcd583a.js.map +1 -0
- package/dist/cordova/src/api/account_management/mfa.d.ts +5 -1
- package/dist/cordova/src/api/authentication/mfa.d.ts +5 -1
- package/dist/cordova/src/api/authentication/sms.d.ts +5 -1
- package/dist/cordova/src/api/index.d.ts +7 -3
- package/dist/cordova/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/cordova/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/{esm5/src/api/account_management/mfa.test.d.ts → cordova/test/integration/flows/recaptcha_enterprise.test.d.ts} +1 -1
- package/dist/esm2017/{index-68602d24.js → index-a7d5cfcc.js} +393 -176
- package/dist/esm2017/index-a7d5cfcc.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/account_management/mfa.d.ts +5 -1
- package/dist/esm2017/src/api/authentication/mfa.d.ts +5 -1
- package/dist/esm2017/src/api/authentication/sms.d.ts +5 -1
- package/dist/esm2017/src/api/index.d.ts +7 -3
- package/dist/esm2017/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/esm2017/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/esm2017/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/{esm5/src/api/account_management/email_and_password.test.d.ts → esm2017/test/integration/flows/recaptcha_enterprise.test.d.ts} +1 -1
- package/dist/index.webworker.js +7912 -0
- package/dist/index.webworker.js.map +1 -0
- package/dist/node/index.js +2 -3
- package/dist/node/index.js.map +1 -1
- package/dist/node/internal.js +555 -844
- package/dist/node/internal.js.map +1 -1
- package/dist/node/src/api/account_management/mfa.d.ts +5 -1
- package/dist/node/src/api/authentication/mfa.d.ts +5 -1
- package/dist/node/src/api/authentication/sms.d.ts +5 -1
- package/dist/node/src/api/index.d.ts +7 -3
- package/dist/node/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/node/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/node/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/node/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/node/test/integration/flows/recaptcha_enterprise.test.d.ts +17 -0
- package/dist/node/totp-ab108bed.js +7582 -0
- package/dist/node/totp-ab108bed.js.map +1 -0
- package/dist/node-esm/index.js +1 -2
- package/dist/node-esm/index.js.map +1 -1
- package/dist/node-esm/internal.js +2 -3
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/src/api/account_management/mfa.d.ts +5 -1
- package/dist/node-esm/src/api/authentication/mfa.d.ts +5 -1
- package/dist/node-esm/src/api/authentication/sms.d.ts +5 -1
- package/dist/node-esm/src/api/index.d.ts +7 -3
- package/dist/node-esm/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/node-esm/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/{esm5/scripts/run_node_tests.d.ts → node-esm/test/integration/flows/recaptcha_enterprise.test.d.ts} +1 -1
- package/dist/node-esm/{totp-219bb96f.js → totp-f311e20a.js} +170 -33
- package/dist/node-esm/totp-f311e20a.js.map +1 -0
- package/dist/rn/index-4d73adbf.js +8575 -0
- package/dist/rn/index-4d73adbf.js.map +1 -0
- package/dist/rn/index.js +45 -55
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +1195 -1890
- package/dist/rn/internal.js.map +1 -1
- package/dist/rn/src/api/account_management/mfa.d.ts +5 -1
- package/dist/rn/src/api/authentication/mfa.d.ts +5 -1
- package/dist/rn/src/api/authentication/sms.d.ts +5 -1
- package/dist/rn/src/api/index.d.ts +7 -3
- package/dist/rn/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/rn/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/rn/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/rn/test/integration/flows/recaptcha_enterprise.test.d.ts +17 -0
- package/dist/src/api/account_management/mfa.d.ts +5 -1
- package/dist/src/api/authentication/mfa.d.ts +5 -1
- package/dist/src/api/authentication/sms.d.ts +5 -1
- package/dist/src/api/index.d.ts +7 -3
- package/dist/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/test/integration/flows/recaptcha_enterprise.test.d.ts +17 -0
- package/dist/web-extension-cjs/index.js +1 -1
- package/dist/web-extension-cjs/internal.js +115 -147
- package/dist/web-extension-cjs/internal.js.map +1 -1
- package/dist/web-extension-cjs/{register-674a8250.js → register-17c71bd5.js} +284 -31
- package/dist/web-extension-cjs/register-17c71bd5.js.map +1 -0
- package/dist/web-extension-cjs/src/api/account_management/mfa.d.ts +5 -1
- package/dist/web-extension-cjs/src/api/authentication/mfa.d.ts +5 -1
- package/dist/web-extension-cjs/src/api/authentication/sms.d.ts +5 -1
- package/dist/web-extension-cjs/src/api/index.d.ts +7 -3
- package/dist/web-extension-cjs/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/web-extension-cjs/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/web-extension-cjs/test/integration/flows/recaptcha_enterprise.test.d.ts +17 -0
- package/dist/web-extension-esm2017/auth-web-extension-public.d.ts +7 -0
- package/dist/web-extension-esm2017/auth-web-extension.d.ts +7 -0
- package/dist/web-extension-esm2017/index.js +2 -2
- package/dist/web-extension-esm2017/internal.js +115 -147
- package/dist/web-extension-esm2017/internal.js.map +1 -1
- package/dist/web-extension-esm2017/{register-428f8789.js → register-77f1d56a.js} +281 -32
- package/dist/web-extension-esm2017/register-77f1d56a.js.map +1 -0
- package/dist/web-extension-esm2017/src/api/account_management/mfa.d.ts +5 -1
- package/dist/web-extension-esm2017/src/api/authentication/mfa.d.ts +5 -1
- package/dist/web-extension-esm2017/src/api/authentication/sms.d.ts +5 -1
- package/dist/web-extension-esm2017/src/api/index.d.ts +7 -3
- package/dist/web-extension-esm2017/src/platform_browser/providers/phone.d.ts +7 -5
- package/dist/web-extension-esm2017/src/platform_browser/recaptcha/recaptcha.d.ts +7 -0
- package/dist/web-extension-esm2017/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +4 -4
- package/dist/web-extension-esm2017/src/platform_browser/strategies/phone.d.ts +10 -6
- package/dist/web-extension-esm2017/test/integration/flows/recaptcha_enterprise.test.d.ts +17 -0
- package/internal/package.json +5 -3
- package/package.json +10 -11
- package/dist/browser-cjs/index-e2e765e6.js.map +0 -1
- package/dist/cordova/popup_redirect-abcbab4c.js +0 -11249
- package/dist/cordova/popup_redirect-abcbab4c.js.map +0 -1
- package/dist/esm2017/index-68602d24.js.map +0 -1
- package/dist/esm5/index-c0803b14.js +0 -12741
- package/dist/esm5/index-c0803b14.js.map +0 -1
- package/dist/esm5/index.cordova.d.ts +0 -32
- package/dist/esm5/index.d.ts +0 -37
- package/dist/esm5/index.doc.d.ts +0 -24
- package/dist/esm5/index.js +0 -7
- package/dist/esm5/index.js.map +0 -1
- package/dist/esm5/index.node.d.ts +0 -17
- package/dist/esm5/index.rn.d.ts +0 -40
- package/dist/esm5/index.shared.d.ts +0 -19
- package/dist/esm5/index.web-extension.d.ts +0 -31
- package/dist/esm5/index.webworker.d.ts +0 -21
- package/dist/esm5/internal/index.d.ts +0 -42
- package/dist/esm5/internal.js +0 -682
- package/dist/esm5/internal.js.map +0 -1
- package/dist/esm5/src/api/account_management/account.d.ts +0 -59
- package/dist/esm5/src/api/account_management/account.test.d.ts +0 -17
- package/dist/esm5/src/api/account_management/email_and_password.d.ts +0 -49
- package/dist/esm5/src/api/account_management/mfa.d.ts +0 -103
- package/dist/esm5/src/api/account_management/profile.d.ts +0 -29
- package/dist/esm5/src/api/account_management/profile.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/create_auth_uri.d.ts +0 -26
- package/dist/esm5/src/api/authentication/create_auth_uri.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/custom_token.d.ts +0 -26
- package/dist/esm5/src/api/authentication/custom_token.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/email_and_password.d.ts +0 -85
- package/dist/esm5/src/api/authentication/email_and_password.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/email_link.d.ts +0 -32
- package/dist/esm5/src/api/authentication/email_link.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/idp.d.ts +0 -40
- package/dist/esm5/src/api/authentication/idp.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/mfa.d.ts +0 -69
- package/dist/esm5/src/api/authentication/mfa.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/recaptcha.d.ts +0 -34
- package/dist/esm5/src/api/authentication/recaptcha.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/sign_up.d.ts +0 -34
- package/dist/esm5/src/api/authentication/sign_up.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/sms.d.ts +0 -50
- package/dist/esm5/src/api/authentication/sms.test.d.ts +0 -17
- package/dist/esm5/src/api/authentication/token.d.ts +0 -37
- package/dist/esm5/src/api/authentication/token.test.d.ts +0 -17
- package/dist/esm5/src/api/errors.d.ts +0 -128
- package/dist/esm5/src/api/index.d.ts +0 -97
- package/dist/esm5/src/api/index.test.d.ts +0 -17
- package/dist/esm5/src/api/password_policy/get_password_policy.d.ts +0 -48
- package/dist/esm5/src/api/password_policy/get_password_policy.test.d.ts +0 -17
- package/dist/esm5/src/api/project_config/get_project_config.d.ts +0 -25
- package/dist/esm5/src/api/project_config/get_project_config.test.d.ts +0 -17
- package/dist/esm5/src/core/action_code_url.d.ts +0 -73
- package/dist/esm5/src/core/action_code_url.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/auth_event_manager.d.ts +0 -34
- package/dist/esm5/src/core/auth/auth_event_manager.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/auth_impl.d.ts +0 -130
- package/dist/esm5/src/core/auth/auth_impl.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/emulator.d.ts +0 -42
- package/dist/esm5/src/core/auth/emulator.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/firebase_internal.d.ts +0 -35
- package/dist/esm5/src/core/auth/firebase_internal.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/initialize.d.ts +0 -46
- package/dist/esm5/src/core/auth/initialize.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/middleware.d.ts +0 -25
- package/dist/esm5/src/core/auth/middleware.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/password_policy_impl.d.ts +0 -59
- package/dist/esm5/src/core/auth/password_policy_impl.test.d.ts +0 -17
- package/dist/esm5/src/core/auth/register.d.ts +0 -23
- package/dist/esm5/src/core/credentials/auth_credential.d.ts +0 -75
- package/dist/esm5/src/core/credentials/email.d.ts +0 -60
- package/dist/esm5/src/core/credentials/email.test.d.ts +0 -17
- package/dist/esm5/src/core/credentials/index.d.ts +0 -23
- package/dist/esm5/src/core/credentials/oauth.d.ts +0 -81
- package/dist/esm5/src/core/credentials/oauth.test.d.ts +0 -17
- package/dist/esm5/src/core/credentials/phone.d.ts +0 -52
- package/dist/esm5/src/core/credentials/phone.test.d.ts +0 -17
- package/dist/esm5/src/core/credentials/saml.d.ts +0 -52
- package/dist/esm5/src/core/credentials/saml.test.d.ts +0 -17
- package/dist/esm5/src/core/errors.d.ts +0 -325
- package/dist/esm5/src/core/errors.test.d.ts +0 -17
- package/dist/esm5/src/core/index.d.ts +0 -230
- package/dist/esm5/src/core/persistence/in_memory.d.ts +0 -35
- package/dist/esm5/src/core/persistence/in_memory.test.d.ts +0 -17
- package/dist/esm5/src/core/persistence/index.d.ts +0 -41
- package/dist/esm5/src/core/persistence/persistence_user_manager.d.ts +0 -45
- package/dist/esm5/src/core/persistence/persistence_user_manager.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/email.d.ts +0 -83
- package/dist/esm5/src/core/providers/email.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/facebook.d.ts +0 -93
- package/dist/esm5/src/core/providers/facebook.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/federated.d.ts +0 -64
- package/dist/esm5/src/core/providers/federated.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/github.d.ts +0 -89
- package/dist/esm5/src/core/providers/github.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/google.d.ts +0 -96
- package/dist/esm5/src/core/providers/google.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/oauth.d.ts +0 -151
- package/dist/esm5/src/core/providers/oauth.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/saml.d.ts +0 -62
- package/dist/esm5/src/core/providers/saml.test.d.ts +0 -17
- package/dist/esm5/src/core/providers/twitter.d.ts +0 -103
- package/dist/esm5/src/core/providers/twitter.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/abstract_popup_redirect_operation.d.ts +0 -44
- package/dist/esm5/src/core/strategies/abstract_popup_redirect_operation.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/action_code_settings.d.ts +0 -19
- package/dist/esm5/src/core/strategies/action_code_settings.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/anonymous.d.ts +0 -32
- package/dist/esm5/src/core/strategies/anonymous.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/credential.d.ts +0 -64
- package/dist/esm5/src/core/strategies/credential.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/custom_token.d.ts +0 -37
- package/dist/esm5/src/core/strategies/custom_token.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/email.d.ts +0 -104
- package/dist/esm5/src/core/strategies/email.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/email_and_password.d.ts +0 -139
- package/dist/esm5/src/core/strategies/email_and_password.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/email_link.d.ts +0 -107
- package/dist/esm5/src/core/strategies/email_link.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/idp.d.ts +0 -32
- package/dist/esm5/src/core/strategies/idp.test.d.ts +0 -17
- package/dist/esm5/src/core/strategies/redirect.d.ts +0 -36
- package/dist/esm5/src/core/strategies/redirect.test.d.ts +0 -17
- package/dist/esm5/src/core/user/account_info.d.ts +0 -68
- package/dist/esm5/src/core/user/account_info.test.d.ts +0 -17
- package/dist/esm5/src/core/user/additional_user_info.d.ts +0 -31
- package/dist/esm5/src/core/user/additional_user_info.test.d.ts +0 -17
- package/dist/esm5/src/core/user/id_token_result.d.ts +0 -48
- package/dist/esm5/src/core/user/id_token_result.test.d.ts +0 -17
- package/dist/esm5/src/core/user/invalidation.d.ts +0 -18
- package/dist/esm5/src/core/user/invalidation.test.d.ts +0 -17
- package/dist/esm5/src/core/user/link_unlink.d.ts +0 -30
- package/dist/esm5/src/core/user/link_unlink.test.d.ts +0 -17
- package/dist/esm5/src/core/user/proactive_refresh.d.ts +0 -34
- package/dist/esm5/src/core/user/proactive_refresh.test.d.ts +0 -17
- package/dist/esm5/src/core/user/reauthenticate.d.ts +0 -20
- package/dist/esm5/src/core/user/reauthenticate.test.d.ts +0 -17
- package/dist/esm5/src/core/user/reload.d.ts +0 -29
- package/dist/esm5/src/core/user/reload.test.d.ts +0 -17
- package/dist/esm5/src/core/user/token_manager.d.ts +0 -50
- package/dist/esm5/src/core/user/token_manager.test.d.ts +0 -17
- package/dist/esm5/src/core/user/user_credential_impl.d.ts +0 -37
- package/dist/esm5/src/core/user/user_credential_impl.test.d.ts +0 -17
- package/dist/esm5/src/core/user/user_impl.d.ts +0 -74
- package/dist/esm5/src/core/user/user_impl.test.d.ts +0 -17
- package/dist/esm5/src/core/user/user_metadata.d.ts +0 -27
- package/dist/esm5/src/core/util/assert.d.ts +0 -94
- package/dist/esm5/src/core/util/assert.test.d.ts +0 -17
- package/dist/esm5/src/core/util/browser.d.ts +0 -50
- package/dist/esm5/src/core/util/browser.test.d.ts +0 -17
- package/dist/esm5/src/core/util/delay.d.ts +0 -31
- package/dist/esm5/src/core/util/delay.test.d.ts +0 -17
- package/dist/esm5/src/core/util/emulator.d.ts +0 -18
- package/dist/esm5/src/core/util/emulator.test.d.ts +0 -17
- package/dist/esm5/src/core/util/event_id.d.ts +0 -17
- package/dist/esm5/src/core/util/event_id.test.d.ts +0 -17
- package/dist/esm5/src/core/util/fetch_provider.d.ts +0 -25
- package/dist/esm5/src/core/util/handler.d.ts +0 -20
- package/dist/esm5/src/core/util/instantiator.d.ts +0 -28
- package/dist/esm5/src/core/util/instantiator.test.d.ts +0 -17
- package/dist/esm5/src/core/util/location.d.ts +0 -19
- package/dist/esm5/src/core/util/log.d.ts +0 -23
- package/dist/esm5/src/core/util/navigator.d.ts +0 -21
- package/dist/esm5/src/core/util/providers.d.ts +0 -23
- package/dist/esm5/src/core/util/resolver.d.ts +0 -25
- package/dist/esm5/src/core/util/time.d.ts +0 -17
- package/dist/esm5/src/core/util/validate_origin.d.ts +0 -18
- package/dist/esm5/src/core/util/validate_origin.test.d.ts +0 -17
- package/dist/esm5/src/core/util/version.d.ts +0 -31
- package/dist/esm5/src/core/util/version.test.d.ts +0 -17
- package/dist/esm5/src/index.d.ts +0 -18
- package/dist/esm5/src/mfa/assertions/totp.d.ts +0 -124
- package/dist/esm5/src/mfa/assertions/totp.test.d.ts +0 -17
- package/dist/esm5/src/mfa/index.d.ts +0 -18
- package/dist/esm5/src/mfa/mfa_assertion.d.ts +0 -27
- package/dist/esm5/src/mfa/mfa_error.d.ts +0 -35
- package/dist/esm5/src/mfa/mfa_info.d.ts +0 -36
- package/dist/esm5/src/mfa/mfa_info.test.d.ts +0 -17
- package/dist/esm5/src/mfa/mfa_resolver.d.ts +0 -41
- package/dist/esm5/src/mfa/mfa_resolver.test.d.ts +0 -17
- package/dist/esm5/src/mfa/mfa_session.d.ts +0 -39
- package/dist/esm5/src/mfa/mfa_session.test.d.ts +0 -17
- package/dist/esm5/src/mfa/mfa_user.d.ts +0 -38
- package/dist/esm5/src/mfa/mfa_user.test.d.ts +0 -17
- package/dist/esm5/src/model/application_verifier.d.ts +0 -23
- package/dist/esm5/src/model/auth.d.ts +0 -87
- package/dist/esm5/src/model/enum_maps.d.ts +0 -98
- package/dist/esm5/src/model/enums.d.ts +0 -74
- package/dist/esm5/src/model/id_token.d.ts +0 -87
- package/dist/esm5/src/model/password_policy.d.ts +0 -111
- package/dist/esm5/src/model/popup_redirect.d.ts +0 -94
- package/dist/esm5/src/model/public_types.d.ts +0 -1285
- package/dist/esm5/src/model/user.d.ts +0 -83
- package/dist/esm5/src/platform_browser/auth.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/auth_window.d.ts +0 -37
- package/dist/esm5/src/platform_browser/iframe/gapi.d.ts +0 -19
- package/dist/esm5/src/platform_browser/iframe/gapi.iframes.d.ts +0 -47
- package/dist/esm5/src/platform_browser/iframe/gapi.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/iframe/iframe.d.ts +0 -18
- package/dist/esm5/src/platform_browser/iframe/iframe.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/index.d.ts +0 -27
- package/dist/esm5/src/platform_browser/load_js.d.ts +0 -29
- package/dist/esm5/src/platform_browser/load_js.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/messagechannel/index.d.ts +0 -87
- package/dist/esm5/src/platform_browser/messagechannel/promise.d.ts +0 -33
- package/dist/esm5/src/platform_browser/messagechannel/promise.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/messagechannel/receiver.d.ts +0 -63
- package/dist/esm5/src/platform_browser/messagechannel/receiver.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/messagechannel/sender.d.ts +0 -46
- package/dist/esm5/src/platform_browser/messagechannel/sender.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/mfa/assertions/phone.d.ts +0 -59
- package/dist/esm5/src/platform_browser/mfa/assertions/phone.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/persistence/browser.d.ts +0 -27
- package/dist/esm5/src/platform_browser/persistence/browser.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/persistence/indexed_db.d.ts +0 -33
- package/dist/esm5/src/platform_browser/persistence/indexed_db.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/persistence/local_storage.d.ts +0 -25
- package/dist/esm5/src/platform_browser/persistence/local_storage.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/persistence/session_storage.d.ts +0 -24
- package/dist/esm5/src/platform_browser/persistence/session_storage.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/popup_redirect.d.ts +0 -27
- package/dist/esm5/src/platform_browser/popup_redirect.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/providers/phone.d.ts +0 -152
- package/dist/esm5/src/platform_browser/providers/phone.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha.d.ts +0 -71
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +0 -45
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_loader.d.ts +0 -49
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_loader.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_mock.d.ts +0 -66
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_mock.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +0 -92
- package/dist/esm5/src/platform_browser/recaptcha/recaptcha_verifier.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/strategies/phone.d.ts +0 -112
- package/dist/esm5/src/platform_browser/strategies/phone.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/strategies/popup.d.ts +0 -109
- package/dist/esm5/src/platform_browser/strategies/popup.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +0 -176
- package/dist/esm5/src/platform_browser/strategies/redirect.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/util/popup.d.ts +0 -24
- package/dist/esm5/src/platform_browser/util/popup.test.d.ts +0 -17
- package/dist/esm5/src/platform_browser/util/worker.d.ts +0 -20
- package/dist/esm5/src/platform_cordova/plugins.d.ts +0 -42
- package/dist/esm5/src/platform_cordova/popup_redirect/events.d.ts +0 -39
- package/dist/esm5/src/platform_cordova/popup_redirect/events.test.d.ts +0 -17
- package/dist/esm5/src/platform_cordova/popup_redirect/popup_redirect.d.ts +0 -24
- package/dist/esm5/src/platform_cordova/popup_redirect/popup_redirect.test.d.ts +0 -17
- package/dist/esm5/src/platform_cordova/popup_redirect/utils.d.ts +0 -47
- package/dist/esm5/src/platform_cordova/popup_redirect/utils.test.d.ts +0 -17
- package/dist/esm5/src/platform_cordova/strategies/redirect.d.ts +0 -20
- package/dist/esm5/src/platform_node/index.d.ts +0 -50
- package/dist/esm5/src/platform_react_native/persistence/react_native.d.ts +0 -25
- package/dist/esm5/src/platform_react_native/persistence/react_native.test.d.ts +0 -17
- package/dist/esm5/test/helpers/api/helper.d.ts +0 -22
- package/dist/esm5/test/helpers/delay.d.ts +0 -20
- package/dist/esm5/test/helpers/erroring_unavailable_persistence.d.ts +0 -36
- package/dist/esm5/test/helpers/fake_service_worker.d.ts +0 -22
- package/dist/esm5/test/helpers/id_token_response.d.ts +0 -18
- package/dist/esm5/test/helpers/iframe_event.d.ts +0 -19
- package/dist/esm5/test/helpers/integration/emulator_rest_helpers.d.ts +0 -35
- package/dist/esm5/test/helpers/integration/helpers.d.ts +0 -32
- package/dist/esm5/test/helpers/integration/settings.d.ts +0 -23
- package/dist/esm5/test/helpers/jwt.d.ts +0 -17
- package/dist/esm5/test/helpers/mock_auth.d.ts +0 -47
- package/dist/esm5/test/helpers/mock_auth_credential.d.ts +0 -31
- package/dist/esm5/test/helpers/mock_fetch.d.ts +0 -30
- package/dist/esm5/test/helpers/mock_fetch.test.d.ts +0 -17
- package/dist/esm5/test/helpers/mock_popup_redirect_resolver.d.ts +0 -24
- package/dist/esm5/test/helpers/redirect_persistence.d.ts +0 -24
- package/dist/esm5/test/helpers/timeout_stub.d.ts +0 -34
- package/dist/esm5/test/integration/flows/anonymous.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/custom.local.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/email.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/idp.local.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/middleware_test_generator.d.ts +0 -18
- package/dist/esm5/test/integration/flows/oob.local.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/password_policy.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/phone.test.d.ts +0 -17
- package/dist/esm5/test/integration/flows/totp.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/anonymous.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/compat/firebaseui.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/persistence.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/popup.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/redirect.test.d.ts +0 -17
- package/dist/esm5/test/integration/webdriver/util/auth_driver.d.ts +0 -46
- package/dist/esm5/test/integration/webdriver/util/functions.d.ts +0 -81
- package/dist/esm5/test/integration/webdriver/util/idp_page.d.ts +0 -31
- package/dist/esm5/test/integration/webdriver/util/js_load_condition.d.ts +0 -25
- package/dist/esm5/test/integration/webdriver/util/test_runner.d.ts +0 -19
- package/dist/esm5/test/integration/webdriver/util/test_server.d.ts +0 -27
- package/dist/esm5/test/integration/webdriver/util/ui_page.d.ts +0 -33
- package/dist/index.webworker.esm5.js +0 -9265
- package/dist/index.webworker.esm5.js.map +0 -1
- package/dist/node/totp-259483a2.js +0 -8762
- package/dist/node/totp-259483a2.js.map +0 -1
- package/dist/node-esm/totp-219bb96f.js.map +0 -1
- package/dist/rn/index-2f66320e.js +0 -9819
- package/dist/rn/index-2f66320e.js.map +0 -1
- package/dist/web-extension-cjs/register-674a8250.js.map +0 -1
- package/dist/web-extension-esm2017/register-428f8789.js.map +0 -1
- /package/dist/{esm5/test/integration/flows/firebaseserverapp.test.d.ts → browser-cjs/test/integration/flows/recaptcha_enterprise.test.d.ts} +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
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 { AuthInternal } from '../../model/auth';
|
|
18
|
-
import { Recaptcha } from './recaptcha';
|
|
19
|
-
export declare const _JSLOAD_CALLBACK: string;
|
|
20
|
-
/**
|
|
21
|
-
* We need to mark this interface as internal explicitly to exclude it in the public typings, because
|
|
22
|
-
* it references AuthInternal which has a circular dependency with UserInternal.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
export interface ReCaptchaLoader {
|
|
27
|
-
load(auth: AuthInternal, hl?: string): Promise<Recaptcha>;
|
|
28
|
-
clearedOneInstance(): void;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Loader for the GReCaptcha library. There should only ever be one of this.
|
|
32
|
-
*/
|
|
33
|
-
export declare class ReCaptchaLoaderImpl implements ReCaptchaLoader {
|
|
34
|
-
private hostLanguage;
|
|
35
|
-
private counter;
|
|
36
|
-
/**
|
|
37
|
-
* Check for `render()` method. `window.grecaptcha` will exist if the Enterprise
|
|
38
|
-
* version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
|
|
39
|
-
* `window.grecaptcha.render()` will not. Another load will add it.
|
|
40
|
-
*/
|
|
41
|
-
private readonly librarySeparatelyLoaded;
|
|
42
|
-
load(auth: AuthInternal, hl?: string): Promise<Recaptcha>;
|
|
43
|
-
clearedOneInstance(): void;
|
|
44
|
-
private shouldResolveImmediately;
|
|
45
|
-
}
|
|
46
|
-
export declare class MockReCaptchaLoaderImpl implements ReCaptchaLoader {
|
|
47
|
-
load(auth: AuthInternal): Promise<Recaptcha>;
|
|
48
|
-
clearedOneInstance(): void;
|
|
49
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,66 +0,0 @@
|
|
|
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 { AuthInternal } from '../../model/auth';
|
|
18
|
-
import { RecaptchaParameters } from '../../model/public_types';
|
|
19
|
-
import { Recaptcha, GreCAPTCHATopLevel, GreCAPTCHARenderOption, GreCAPTCHA } from './recaptcha';
|
|
20
|
-
export declare const _SOLVE_TIME_MS = 500;
|
|
21
|
-
export declare const _EXPIRATION_TIME_MS = 60000;
|
|
22
|
-
export declare const _WIDGET_ID_START = 1000000000000;
|
|
23
|
-
export interface Widget {
|
|
24
|
-
getResponse: () => string | null;
|
|
25
|
-
delete: () => void;
|
|
26
|
-
execute: () => void;
|
|
27
|
-
}
|
|
28
|
-
export declare class MockReCaptcha implements Recaptcha {
|
|
29
|
-
private readonly auth;
|
|
30
|
-
private counter;
|
|
31
|
-
_widgets: Map<number, Widget>;
|
|
32
|
-
constructor(auth: AuthInternal);
|
|
33
|
-
render(container: string | HTMLElement, parameters?: RecaptchaParameters): number;
|
|
34
|
-
reset(optWidgetId?: number): void;
|
|
35
|
-
getResponse(optWidgetId?: number): string;
|
|
36
|
-
execute(optWidgetId?: number | string): Promise<string>;
|
|
37
|
-
}
|
|
38
|
-
export declare class MockGreCAPTCHATopLevel implements GreCAPTCHATopLevel {
|
|
39
|
-
enterprise: GreCAPTCHA;
|
|
40
|
-
ready(callback: () => void): void;
|
|
41
|
-
execute(_siteKey: string, _options: {
|
|
42
|
-
action: string;
|
|
43
|
-
}): Promise<string>;
|
|
44
|
-
render(_container: string | HTMLElement, _parameters: GreCAPTCHARenderOption): string;
|
|
45
|
-
}
|
|
46
|
-
export declare class MockGreCAPTCHA implements GreCAPTCHA {
|
|
47
|
-
ready(callback: () => void): void;
|
|
48
|
-
execute(_siteKey: string, _options: {
|
|
49
|
-
action: string;
|
|
50
|
-
}): Promise<string>;
|
|
51
|
-
render(_container: string | HTMLElement, _parameters: GreCAPTCHARenderOption): string;
|
|
52
|
-
}
|
|
53
|
-
export declare class MockWidget {
|
|
54
|
-
private readonly params;
|
|
55
|
-
private readonly container;
|
|
56
|
-
private readonly isVisible;
|
|
57
|
-
private timerId;
|
|
58
|
-
private deleted;
|
|
59
|
-
private responseToken;
|
|
60
|
-
private readonly clickHandler;
|
|
61
|
-
constructor(containerOrId: string | HTMLElement, appName: string, params: RecaptchaParameters);
|
|
62
|
-
getResponse(): string | null;
|
|
63
|
-
delete(): void;
|
|
64
|
-
execute(): void;
|
|
65
|
-
private checkIfDeleted;
|
|
66
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,92 +0,0 @@
|
|
|
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 { Auth, RecaptchaParameters } from '../../model/public_types';
|
|
18
|
-
import { ApplicationVerifierInternal } from '../../model/application_verifier';
|
|
19
|
-
import { ReCaptchaLoader } from './recaptcha_loader';
|
|
20
|
-
export declare const RECAPTCHA_VERIFIER_TYPE = "recaptcha";
|
|
21
|
-
/**
|
|
22
|
-
* An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* `RecaptchaVerifier` does not work in a Node.js environment.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export declare class RecaptchaVerifier implements ApplicationVerifierInternal {
|
|
30
|
-
private readonly parameters;
|
|
31
|
-
/**
|
|
32
|
-
* The application verifier type.
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* For a reCAPTCHA verifier, this is 'recaptcha'.
|
|
36
|
-
*/
|
|
37
|
-
readonly type = "recaptcha";
|
|
38
|
-
private destroyed;
|
|
39
|
-
private widgetId;
|
|
40
|
-
private readonly container;
|
|
41
|
-
private readonly isInvisible;
|
|
42
|
-
private readonly tokenChangeListeners;
|
|
43
|
-
private renderPromise;
|
|
44
|
-
private readonly auth;
|
|
45
|
-
/** @internal */
|
|
46
|
-
readonly _recaptchaLoader: ReCaptchaLoader;
|
|
47
|
-
private recaptcha;
|
|
48
|
-
/**
|
|
49
|
-
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
50
|
-
*
|
|
51
|
-
* @param containerOrId - The reCAPTCHA container parameter.
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a
|
|
55
|
-
* visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to
|
|
56
|
-
* an element ID. The corresponding element must also must be in the DOM at the time of
|
|
57
|
-
* initialization.
|
|
58
|
-
*
|
|
59
|
-
* @param parameters - The optional reCAPTCHA parameters.
|
|
60
|
-
*
|
|
61
|
-
* @remarks
|
|
62
|
-
* Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for
|
|
63
|
-
* the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will
|
|
64
|
-
* configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
|
|
65
|
-
* 'invisible'.
|
|
66
|
-
*/
|
|
67
|
-
constructor(authExtern: Auth, containerOrId: HTMLElement | string, parameters?: RecaptchaParameters);
|
|
68
|
-
/**
|
|
69
|
-
* Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
|
|
70
|
-
*
|
|
71
|
-
* @returns A Promise for the reCAPTCHA token.
|
|
72
|
-
*/
|
|
73
|
-
verify(): Promise<string>;
|
|
74
|
-
/**
|
|
75
|
-
* Renders the reCAPTCHA widget on the page.
|
|
76
|
-
*
|
|
77
|
-
* @returns A Promise that resolves with the reCAPTCHA widget ID.
|
|
78
|
-
*/
|
|
79
|
-
render(): Promise<number>;
|
|
80
|
-
/** @internal */
|
|
81
|
-
_reset(): void;
|
|
82
|
-
/**
|
|
83
|
-
* Clears the reCAPTCHA widget from the page and destroys the instance.
|
|
84
|
-
*/
|
|
85
|
-
clear(): void;
|
|
86
|
-
private validateStartingState;
|
|
87
|
-
private makeTokenCallback;
|
|
88
|
-
private assertNotDestroyed;
|
|
89
|
-
private makeRenderPromise;
|
|
90
|
-
private init;
|
|
91
|
-
private getAssertedRecaptcha;
|
|
92
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,112 +0,0 @@
|
|
|
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 { ApplicationVerifier, Auth, ConfirmationResult, PhoneInfoOptions, User } from '../../model/public_types';
|
|
18
|
-
import { ApplicationVerifierInternal } from '../../model/application_verifier';
|
|
19
|
-
import { PhoneAuthCredential } from '../../core/credentials/phone';
|
|
20
|
-
import { AuthInternal } from '../../model/auth';
|
|
21
|
-
/**
|
|
22
|
-
* Asynchronously signs in using a phone number.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* This method sends a code via SMS to the given
|
|
26
|
-
* phone number, and returns a {@link ConfirmationResult}. After the user
|
|
27
|
-
* provides the code sent to their phone, call {@link ConfirmationResult.confirm}
|
|
28
|
-
* with the code to sign the user in.
|
|
29
|
-
*
|
|
30
|
-
* For abuse prevention, this method also requires a {@link ApplicationVerifier}.
|
|
31
|
-
* This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.
|
|
32
|
-
* This function can work on other platforms that do not support the
|
|
33
|
-
* {@link RecaptchaVerifier} (like React Native), but you need to use a
|
|
34
|
-
* third-party {@link ApplicationVerifier} implementation.
|
|
35
|
-
*
|
|
36
|
-
* This method does not work in a Node.js environment or with {@link Auth} instances created with a
|
|
37
|
-
* {@link @firebase/app#FirebaseServerApp}.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```javascript
|
|
41
|
-
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
42
|
-
* const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
|
|
43
|
-
* const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
|
|
44
|
-
* // Obtain a verificationCode from the user.
|
|
45
|
-
* const credential = await confirmationResult.confirm(verificationCode);
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @param auth - The {@link Auth} instance.
|
|
49
|
-
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
50
|
-
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
51
|
-
*
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, appVerifier: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
55
|
-
/**
|
|
56
|
-
* Links the user account with the given phone number.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* This method does not work in a Node.js environment.
|
|
60
|
-
*
|
|
61
|
-
* @param user - The user.
|
|
62
|
-
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
63
|
-
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
64
|
-
*
|
|
65
|
-
* @public
|
|
66
|
-
*/
|
|
67
|
-
export declare function linkWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
68
|
-
/**
|
|
69
|
-
* Re-authenticates a user using a fresh phone credential.
|
|
70
|
-
*
|
|
71
|
-
* @remarks
|
|
72
|
-
* Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.
|
|
73
|
-
*
|
|
74
|
-
* This method does not work in a Node.js environment or on any {@link User} signed in by
|
|
75
|
-
* {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}.
|
|
76
|
-
*
|
|
77
|
-
* @param user - The user.
|
|
78
|
-
* @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).
|
|
79
|
-
* @param appVerifier - The {@link ApplicationVerifier}.
|
|
80
|
-
*
|
|
81
|
-
* @public
|
|
82
|
-
*/
|
|
83
|
-
export declare function reauthenticateWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
84
|
-
/**
|
|
85
|
-
* Returns a verification ID to be used in conjunction with the SMS code that is sent.
|
|
86
|
-
*
|
|
87
|
-
*/
|
|
88
|
-
export declare function _verifyPhoneNumber(auth: AuthInternal, options: PhoneInfoOptions | string, verifier: ApplicationVerifierInternal): Promise<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Updates the user's phone number.
|
|
91
|
-
*
|
|
92
|
-
* @remarks
|
|
93
|
-
* This method does not work in a Node.js environment or on any {@link User} signed in by
|
|
94
|
-
* {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```
|
|
98
|
-
* // 'recaptcha-container' is the ID of an element in the DOM.
|
|
99
|
-
* const applicationVerifier = new RecaptchaVerifier('recaptcha-container');
|
|
100
|
-
* const provider = new PhoneAuthProvider(auth);
|
|
101
|
-
* const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);
|
|
102
|
-
* // Obtain the verificationCode from the user.
|
|
103
|
-
* const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);
|
|
104
|
-
* await updatePhoneNumber(user, phoneCredential);
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* @param user - The user.
|
|
108
|
-
* @param credential - A credential authenticating the new phone number.
|
|
109
|
-
*
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
export declare function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise<void>;
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,109 +0,0 @@
|
|
|
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 { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from '../../model/public_types';
|
|
18
|
-
import { Delay } from '../../core/util/delay';
|
|
19
|
-
export declare const enum _Timeout {
|
|
20
|
-
AUTH_EVENT = 8000
|
|
21
|
-
}
|
|
22
|
-
export declare const _POLL_WINDOW_CLOSE_TIMEOUT: Delay;
|
|
23
|
-
/**
|
|
24
|
-
* Authenticates a Firebase client using a popup-based OAuth authentication flow.
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* If succeeds, returns the signed in user along with the provider's credential. If sign in was
|
|
28
|
-
* unsuccessful, returns an error object containing additional information about the error.
|
|
29
|
-
*
|
|
30
|
-
* This method does not work in a Node.js environment or with {@link Auth} instances created with a
|
|
31
|
-
* {@link @firebase/app#FirebaseServerApp}.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```javascript
|
|
35
|
-
* // Sign in using a popup.
|
|
36
|
-
* const provider = new FacebookAuthProvider();
|
|
37
|
-
* const result = await signInWithPopup(auth, provider);
|
|
38
|
-
*
|
|
39
|
-
* // The signed-in user info.
|
|
40
|
-
* const user = result.user;
|
|
41
|
-
* // This gives you a Facebook Access Token.
|
|
42
|
-
* const credential = provider.credentialFromResult(auth, result);
|
|
43
|
-
* const token = credential.accessToken;
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @param auth - The {@link Auth} instance.
|
|
47
|
-
* @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.
|
|
48
|
-
* Non-OAuth providers like {@link EmailAuthProvider} will throw an error.
|
|
49
|
-
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
50
|
-
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
51
|
-
*
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
export declare function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
55
|
-
/**
|
|
56
|
-
* Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based
|
|
57
|
-
* OAuth flow.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* If the reauthentication is successful, the returned result will contain the user and the
|
|
61
|
-
* provider's credential.
|
|
62
|
-
*
|
|
63
|
-
* This method does not work in a Node.js environment or on any {@link User} signed in by
|
|
64
|
-
* {@link Auth} instances created with a {@link @firebase/app#FirebaseServerApp}.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```javascript
|
|
68
|
-
* // Sign in using a popup.
|
|
69
|
-
* const provider = new FacebookAuthProvider();
|
|
70
|
-
* const result = await signInWithPopup(auth, provider);
|
|
71
|
-
* // Reauthenticate using a popup.
|
|
72
|
-
* await reauthenticateWithPopup(result.user, provider);
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* @param user - The user.
|
|
76
|
-
* @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.
|
|
77
|
-
* Non-OAuth providers like {@link EmailAuthProvider} will throw an error.
|
|
78
|
-
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
79
|
-
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
80
|
-
*
|
|
81
|
-
* @public
|
|
82
|
-
*/
|
|
83
|
-
export declare function reauthenticateWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
84
|
-
/**
|
|
85
|
-
* Links the authenticated provider to the user account using a pop-up based OAuth flow.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* If the linking is successful, the returned result will contain the user and the provider's credential.
|
|
89
|
-
*
|
|
90
|
-
* This method does not work in a Node.js environment.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```javascript
|
|
94
|
-
* // Sign in using some other provider.
|
|
95
|
-
* const result = await signInWithEmailAndPassword(auth, email, password);
|
|
96
|
-
* // Link using a popup.
|
|
97
|
-
* const provider = new FacebookAuthProvider();
|
|
98
|
-
* await linkWithPopup(result.user, provider);
|
|
99
|
-
* ```
|
|
100
|
-
*
|
|
101
|
-
* @param user - The user.
|
|
102
|
-
* @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.
|
|
103
|
-
* Non-OAuth providers like {@link EmailAuthProvider} will throw an error.
|
|
104
|
-
* @param resolver - An instance of {@link PopupRedirectResolver}, optional
|
|
105
|
-
* if already supplied to {@link initializeAuth} or provided by {@link getAuth}.
|
|
106
|
-
*
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
|
-
export declare function linkWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|