@clerk/ui 1.42.5-snapshot.v20261112145506 → 1.42.5
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/dist/ClerkUI.js +2 -2
- package/dist/common/SSOCallback.js +11 -3
- package/dist/common/SSOCallback.js.map +1 -1
- package/dist/components/SignIn/SignInStart.js +1 -1
- package/dist/components/SignIn/SignInStart.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/no-rhc/ClerkUI.js +2 -2
- package/dist/no-rhc/common/SSOCallback.js +11 -3
- package/dist/no-rhc/common/SSOCallback.js.map +1 -1
- package/dist/no-rhc/components/SignIn/SignInStart.js +1 -1
- package/dist/no-rhc/components/SignIn/SignInStart.js.map +1 -1
- package/dist/no-rhc/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/{signin_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → signin_ui_4571b4_1.42.5.js} +1 -1
- package/dist/{signin_ui_9851fe_1.42.5-snapshot.v20261112145506.js → signin_ui_b98c3b_1.42.5.js} +1 -1
- package/dist/{signin_ui_96f30d_1.42.5-snapshot.v20261112145506.js → signin_ui_b99858_1.42.5.js} +1 -1
- package/dist/{ui-common_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → ui-common_ui_4571b4_1.42.5.js} +4 -4
- package/dist/ui-common_ui_b98c3b_1.42.5.js +1 -0
- package/dist/{ui-common_ui_96f30d_1.42.5-snapshot.v20261112145506.js → ui-common_ui_b99858_1.42.5.js} +4 -4
- package/dist/ui.browser.js +7 -7
- package/dist/ui.legacy.browser.js +1 -1
- package/dist/ui.shared.browser.js +5 -5
- package/package.json +3 -3
- package/dist/ui-common_ui_9851fe_1.42.5-snapshot.v20261112145506.js +0 -1
- /package/dist/{3736_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 3736_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{3736_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 3736_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{3736_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 3736_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{4424_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 4424_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{4424_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 4424_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{4424_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 4424_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{524_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 524_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{524_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 524_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{524_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 524_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{6206_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 6206_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{6206_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 6206_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{6206_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 6206_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{6678_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 6678_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{6678_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 6678_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{6678_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 6678_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{7181_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 7181_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{7181_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 7181_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{7181_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 7181_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{8316_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 8316_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{8316_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 8316_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{8316_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 8316_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{8746_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 8746_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{8746_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 8746_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{8746_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 8746_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{9419_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 9419_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{9419_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 9419_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{9419_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 9419_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{980_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → 980_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{980_ui_9851fe_1.42.5-snapshot.v20261112145506.js → 980_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{980_ui_96f30d_1.42.5-snapshot.v20261112145506.js → 980_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{apiKeys_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → apiKeys_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{apiKeys_ui_9851fe_1.42.5-snapshot.v20261112145506.js → apiKeys_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{apiKeys_ui_96f30d_1.42.5-snapshot.v20261112145506.js → apiKeys_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{blankcaptcha_ui_96f30d_1.42.5-snapshot.v20261112145506.js → blankcaptcha_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{blankcaptcha_ui_9851fe_1.42.5-snapshot.v20261112145506.js → blankcaptcha_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{blankcaptcha_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → blankcaptcha_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{checkout_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → checkout_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{checkout_ui_9851fe_1.42.5-snapshot.v20261112145506.js → checkout_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{checkout_ui_96f30d_1.42.5-snapshot.v20261112145506.js → checkout_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{configureDirectorySync_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → configureDirectorySync_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{configureDirectorySync_ui_9851fe_1.42.5-snapshot.v20261112145506.js → configureDirectorySync_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{configureDirectorySync_ui_96f30d_1.42.5-snapshot.v20261112145506.js → configureDirectorySync_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{configureSSO_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → configureSSO_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{configureSSO_ui_9851fe_1.42.5-snapshot.v20261112145506.js → configureSSO_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{configureSSO_ui_96f30d_1.42.5-snapshot.v20261112145506.js → configureSSO_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → copy-api-key-modal_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_9851fe_1.42.5-snapshot.v20261112145506.js → copy-api-key-modal_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_96f30d_1.42.5-snapshot.v20261112145506.js → copy-api-key-modal_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{createorganization_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → createorganization_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{createorganization_ui_9851fe_1.42.5-snapshot.v20261112145506.js → createorganization_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{createorganization_ui_96f30d_1.42.5-snapshot.v20261112145506.js → createorganization_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{credit-history-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → credit-history-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{credit-history-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → credit-history-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{credit-history-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → credit-history-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → enableOrganizationsPrompt_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_9851fe_1.42.5-snapshot.v20261112145506.js → enableOrganizationsPrompt_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_96f30d_1.42.5-snapshot.v20261112145506.js → enableOrganizationsPrompt_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{framework_ui_9851fe_1.42.5-snapshot.v20261112145506.js → framework_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{framework_ui_96f30d_1.42.5-snapshot.v20261112145506.js → framework_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{impersonationfab_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → impersonationfab_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{impersonationfab_ui_9851fe_1.42.5-snapshot.v20261112145506.js → impersonationfab_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{impersonationfab_ui_96f30d_1.42.5-snapshot.v20261112145506.js → impersonationfab_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{invitemembers_ui_96f30d_1.42.5-snapshot.v20261112145506.js → invitemembers_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{invitemembers_ui_9851fe_1.42.5-snapshot.v20261112145506.js → invitemembers_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{invitemembers_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → invitemembers_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{keylessPrompt_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → keylessPrompt_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{keylessPrompt_ui_9851fe_1.42.5-snapshot.v20261112145506.js → keylessPrompt_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{keylessPrompt_ui_96f30d_1.42.5-snapshot.v20261112145506.js → keylessPrompt_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{oauthConsent_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → oauthConsent_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{oauthConsent_ui_9851fe_1.42.5-snapshot.v20261112145506.js → oauthConsent_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{oauthConsent_ui_96f30d_1.42.5-snapshot.v20261112145506.js → oauthConsent_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{oauthDeviceVerification_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → oauthDeviceVerification_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{oauthDeviceVerification_ui_9851fe_1.42.5-snapshot.v20261112145506.js → oauthDeviceVerification_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{oauthDeviceVerification_ui_96f30d_1.42.5-snapshot.v20261112145506.js → oauthDeviceVerification_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{onetap_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → onetap_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{onetap_ui_9851fe_1.42.5-snapshot.v20261112145506.js → onetap_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{onetap_ui_96f30d_1.42.5-snapshot.v20261112145506.js → onetap_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{op-api-keys-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → op-api-keys-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{op-api-keys-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → op-api-keys-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{op-api-keys-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → op-api-keys-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{op-billing-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → op-billing-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{op-billing-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → op-billing-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{op-billing-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → op-billing-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{op-plans-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → op-plans-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{op-plans-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → op-plans-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{op-plans-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → op-plans-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{op-security-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → op-security-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{op-security-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → op-security-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{op-security-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → op-security-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{organizationlist_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → organizationlist_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{organizationlist_ui_9851fe_1.42.5-snapshot.v20261112145506.js → organizationlist_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{organizationlist_ui_96f30d_1.42.5-snapshot.v20261112145506.js → organizationlist_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{organizationprofile_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → organizationprofile_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{organizationprofile_ui_9851fe_1.42.5-snapshot.v20261112145506.js → organizationprofile_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{organizationprofile_ui_96f30d_1.42.5-snapshot.v20261112145506.js → organizationprofile_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{organizationswitcher_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → organizationswitcher_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{organizationswitcher_ui_9851fe_1.42.5-snapshot.v20261112145506.js → organizationswitcher_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{organizationswitcher_ui_96f30d_1.42.5-snapshot.v20261112145506.js → organizationswitcher_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{payment-attempt-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → payment-attempt-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{payment-attempt-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → payment-attempt-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{payment-attempt-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → payment-attempt-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{planDetails_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → planDetails_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{planDetails_ui_9851fe_1.42.5-snapshot.v20261112145506.js → planDetails_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{planDetails_ui_96f30d_1.42.5-snapshot.v20261112145506.js → planDetails_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_96f30d_1.42.5-snapshot.v20261112145506.js → prefetchorganizationlist_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_9851fe_1.42.5-snapshot.v20261112145506.js → prefetchorganizationlist_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → prefetchorganizationlist_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{pricingTable_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → pricingTable_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{pricingTable_ui_9851fe_1.42.5-snapshot.v20261112145506.js → pricingTable_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{pricingTable_ui_96f30d_1.42.5-snapshot.v20261112145506.js → pricingTable_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{protectcheck_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → protectcheck_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{protectcheck_ui_9851fe_1.42.5-snapshot.v20261112145506.js → protectcheck_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{protectcheck_ui_96f30d_1.42.5-snapshot.v20261112145506.js → protectcheck_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → revoke-api-key-modal_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_9851fe_1.42.5-snapshot.v20261112145506.js → revoke-api-key-modal_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_96f30d_1.42.5-snapshot.v20261112145506.js → revoke-api-key-modal_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{sessionTasks_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → sessionTasks_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{sessionTasks_ui_9851fe_1.42.5-snapshot.v20261112145506.js → sessionTasks_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{sessionTasks_ui_96f30d_1.42.5-snapshot.v20261112145506.js → sessionTasks_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{signup_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → signup_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{signup_ui_9851fe_1.42.5-snapshot.v20261112145506.js → signup_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{signup_ui_96f30d_1.42.5-snapshot.v20261112145506.js → signup_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{statement-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → statement-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{statement-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → statement-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{statement-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → statement-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{subscriptionDetails_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → subscriptionDetails_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{subscriptionDetails_ui_9851fe_1.42.5-snapshot.v20261112145506.js → subscriptionDetails_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{subscriptionDetails_ui_96f30d_1.42.5-snapshot.v20261112145506.js → subscriptionDetails_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → taskChooseOrganization_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_9851fe_1.42.5-snapshot.v20261112145506.js → taskChooseOrganization_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_96f30d_1.42.5-snapshot.v20261112145506.js → taskChooseOrganization_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{taskResetPassword_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → taskResetPassword_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{taskResetPassword_ui_9851fe_1.42.5-snapshot.v20261112145506.js → taskResetPassword_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{taskResetPassword_ui_96f30d_1.42.5-snapshot.v20261112145506.js → taskResetPassword_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{taskSetupMFA_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → taskSetupMFA_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{taskSetupMFA_ui_9851fe_1.42.5-snapshot.v20261112145506.js → taskSetupMFA_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{taskSetupMFA_ui_96f30d_1.42.5-snapshot.v20261112145506.js → taskSetupMFA_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{up-api-keys-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → up-api-keys-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{up-api-keys-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → up-api-keys-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{up-api-keys-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → up-api-keys-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{up-billing-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → up-billing-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{up-billing-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → up-billing-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{up-billing-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → up-billing-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{up-plans-page_ui_96f30d_1.42.5-snapshot.v20261112145506.js → up-plans-page_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{up-plans-page_ui_9851fe_1.42.5-snapshot.v20261112145506.js → up-plans-page_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{up-plans-page_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → up-plans-page_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{useravatar_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → useravatar_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{useravatar_ui_9851fe_1.42.5-snapshot.v20261112145506.js → useravatar_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{useravatar_ui_96f30d_1.42.5-snapshot.v20261112145506.js → useravatar_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{userbutton_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → userbutton_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{userbutton_ui_9851fe_1.42.5-snapshot.v20261112145506.js → userbutton_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{userbutton_ui_96f30d_1.42.5-snapshot.v20261112145506.js → userbutton_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{userprofile_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → userprofile_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{userprofile_ui_9851fe_1.42.5-snapshot.v20261112145506.js → userprofile_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{userprofile_ui_96f30d_1.42.5-snapshot.v20261112145506.js → userprofile_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{userverification_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → userverification_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{userverification_ui_9851fe_1.42.5-snapshot.v20261112145506.js → userverification_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{userverification_ui_96f30d_1.42.5-snapshot.v20261112145506.js → userverification_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{vendors_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → vendors_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{vendors_ui_9851fe_1.42.5-snapshot.v20261112145506.js → vendors_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{vendors_ui_96f30d_1.42.5-snapshot.v20261112145506.js → vendors_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{waitlist_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → waitlist_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{waitlist_ui_9851fe_1.42.5-snapshot.v20261112145506.js → waitlist_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{waitlist_ui_96f30d_1.42.5-snapshot.v20261112145506.js → waitlist_ui_b99858_1.42.5.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_96f30d_1.42.5-snapshot.v20261112145506.js → web3-solana-wallet-buttons_ui_4571b4_1.42.5.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_9851fe_1.42.5-snapshot.v20261112145506.js → web3-solana-wallet-buttons_ui_b98c3b_1.42.5.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_f4f65f_1.42.5-snapshot.v20261112145506.js → web3-solana-wallet-buttons_ui_b99858_1.42.5.js} +0 -0
package/dist/ClerkUI.js
CHANGED
|
@@ -22,8 +22,8 @@ import { isVersionAtLeast, parseVersion } from "@clerk/shared/versionCheck";
|
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
var ClerkUI = class ClerkUI {
|
|
25
|
-
static version = "1.42.5
|
|
26
|
-
version = "1.42.5
|
|
25
|
+
static version = "1.42.5";
|
|
26
|
+
version = "1.42.5";
|
|
27
27
|
#componentRenderer;
|
|
28
28
|
/**
|
|
29
29
|
* Creates a new `ClerkUI` instance and mounts the internal component renderer.
|
|
@@ -31,11 +31,19 @@ const SSOCallbackCard = (props) => {
|
|
|
31
31
|
reloadResource
|
|
32
32
|
}, navigate).catch((e) => {
|
|
33
33
|
if (cancelled) return;
|
|
34
|
-
|
|
34
|
+
let shownError;
|
|
35
|
+
const showError = (error) => {
|
|
36
|
+
shownError = error;
|
|
37
|
+
card.setError(error);
|
|
38
|
+
};
|
|
39
|
+
bounceTimeoutRef.current = setTimeout(() => {
|
|
40
|
+
if (window.Clerk) window.Clerk.__internal_last_error = shownError;
|
|
41
|
+
navigate("../");
|
|
42
|
+
}, 4e3);
|
|
35
43
|
try {
|
|
36
|
-
handleError(e, [],
|
|
44
|
+
handleError(e, [], showError);
|
|
37
45
|
} catch {
|
|
38
|
-
|
|
46
|
+
showError("Unable to complete action at this time. If the problem persists please contact support.");
|
|
39
47
|
}
|
|
40
48
|
});
|
|
41
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSOCallback.js","names":[],"sources":["../../src/common/SSOCallback.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { Flow } from '../customizables';\nimport { CaptchaElement } from '../elements/CaptchaElement';\nimport { Card } from '../elements/Card';\nimport { useCardState, withCardStateProvider } from '../elements/contexts';\nimport { LoadingCardContainer } from '../elements/LoadingCard';\nimport { useRouter } from '../router';\nimport { handleError } from '../utils/errorHandler';\n\nexport const SSOCallback = withCardStateProvider<HandleOAuthCallbackParams | HandleSamlCallbackParams>(props => {\n return (\n <Flow.Part part='ssoCallback'>\n <SSOCallbackCard {...props} />\n </Flow.Part>\n );\n});\n\nexport const SSOCallbackCard = (props: HandleOAuthCallbackParams | HandleSamlCallbackParams) => {\n const { handleRedirectCallback, __internal_setActiveInProgress } = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n\n const bounceTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n React.useEffect(() => {\n let cancelled = false;\n\n if (__internal_setActiveInProgress !== true) {\n const intent = new URLSearchParams(window.location.search).get('intent');\n const reloadResource = intent === 'signIn' || intent === 'signUp' ? intent : undefined;\n handleRedirectCallback({ ...props, reloadResource }, navigate).catch(e => {\n if (cancelled) {\n return;\n }\n\n bounceTimeoutRef.current = setTimeout(() => void navigate('../'), 4000);\n try {\n handleError(e, [],
|
|
1
|
+
{"version":3,"file":"SSOCallback.js","names":[],"sources":["../../src/common/SSOCallback.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { Flow } from '../customizables';\nimport { CaptchaElement } from '../elements/CaptchaElement';\nimport { Card } from '../elements/Card';\nimport { useCardState, withCardStateProvider } from '../elements/contexts';\nimport { LoadingCardContainer } from '../elements/LoadingCard';\nimport { useRouter } from '../router';\nimport { handleError } from '../utils/errorHandler';\n\nexport const SSOCallback = withCardStateProvider<HandleOAuthCallbackParams | HandleSamlCallbackParams>(props => {\n return (\n <Flow.Part part='ssoCallback'>\n <SSOCallbackCard {...props} />\n </Flow.Part>\n );\n});\n\nexport const SSOCallbackCard = (props: HandleOAuthCallbackParams | HandleSamlCallbackParams) => {\n const { handleRedirectCallback, __internal_setActiveInProgress } = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n\n const bounceTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n React.useEffect(() => {\n let cancelled = false;\n\n if (__internal_setActiveInProgress !== true) {\n const intent = new URLSearchParams(window.location.search).get('intent');\n const reloadResource = intent === 'signIn' || intent === 'signUp' ? intent : undefined;\n handleRedirectCallback({ ...props, reloadResource }, navigate).catch(e => {\n if (cancelled) {\n return;\n }\n\n let shownError: Parameters<typeof card.setError>[0];\n const showError = (error: typeof shownError) => {\n shownError = error;\n card.setError(error);\n };\n\n bounceTimeoutRef.current = setTimeout(() => {\n if (window.Clerk) {\n window.Clerk.__internal_last_error = shownError;\n }\n void navigate('../');\n }, 4000);\n try {\n handleError(e, [], showError);\n } catch {\n showError('Unable to complete action at this time. If the problem persists please contact support.');\n }\n });\n }\n\n return () => {\n cancelled = true;\n clearTimeout(bounceTimeoutRef.current);\n };\n }, [handleError, handleRedirectCallback]);\n\n return (\n <Flow.Part part='ssoCallback'>\n <Card.Root>\n <Card.Content>\n <Card.Alert>{card.error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pC,oBAAC,sBAAD,CAAuB;GACvB,oBAAC,gBAAD,CAAiB;EACL,MACd,oBAAC,KAAK,QAAN,CAAc,EACL;CACF;AAEf"}
|
|
@@ -347,7 +347,7 @@ function SignInStartInternal() {
|
|
|
347
347
|
};
|
|
348
348
|
const error = signIn?.firstFactorVerification?.error;
|
|
349
349
|
if (error) {
|
|
350
|
-
switch (error.code) {
|
|
350
|
+
if (!card.error) switch (error.code) {
|
|
351
351
|
case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:
|
|
352
352
|
case ERROR_CODES.OAUTH_ACCESS_DENIED:
|
|
353
353
|
case ERROR_CODES.NOT_ALLOWED_ACCESS:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInStart.js","names":[],"sources":["../../../src/components/SignIn/SignInStart.tsx"],"sourcesContent":["import { getAlternativePhoneCodeProviderData } from '@clerk/shared/alternativePhoneCode';\nimport { inertProps } from '@clerk/shared/inert';\nimport { ERROR_CODES, SIGN_UP_MODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { clerkInvalidFAPIResponse } from '@clerk/shared/internal/clerk-js/errors';\nimport { getClerkQueryParam, removeClerkQueryParam } from '@clerk/shared/internal/clerk-js/queryParams';\nimport { useClerk } from '@clerk/shared/react';\nimport type {\n ClerkAPIError,\n PhoneCodeChannel,\n PhoneCodeChannelData,\n SignInCreateParams,\n SignInResource,\n} from '@clerk/shared/types';\nimport { isWebAuthnAutofillSupported } from '@clerk/shared/webauthn';\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { Card } from '@/ui/elements/Card';\nimport { useCardState, withCardStateProvider } from '@/ui/elements/contexts';\nimport { Form } from '@/ui/elements/Form';\nimport { Header } from '@/ui/elements/Header';\nimport { LoadingCard } from '@/ui/elements/LoadingCard';\nimport { SocialButtonsReversibleContainerWithDivider } from '@/ui/elements/ReversibleContainer';\nimport { actionBlockedDetailsFrom } from '@/ui/utils/actionBlocked';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { isMobileDevice } from '@/ui/utils/isMobileDevice';\nimport type { FormControlState } from '@/ui/utils/useFormControl';\nimport { buildRequest, useFormControl } from '@/ui/utils/useFormControl';\n\nimport type { SignInStartIdentifier } from '../../common';\nimport {\n ActionBlockedCard,\n getIdentifierControlDisplayValues,\n groupIdentifiers,\n withRedirectToAfterSignIn,\n withRedirectToSignInTask,\n} from '../../common';\nimport { useCoreSignIn, useEnvironment, useSignInContext } from '../../contexts';\nimport { Col, descriptors, Flow, localizationKeys } from '../../customizables';\nimport { CaptchaElement } from '../../elements/CaptchaElement';\nimport { useIsWebAuthnSupported, useLoadingStatus } from '../../hooks';\nimport { useSupportEmail } from '../../hooks/useSupportEmail';\nimport { useTotalEnabledAuthMethods } from '../../hooks/useTotalEnabledAuthMethods';\nimport { useRouter } from '../../router';\nimport {\n hasOnlyEnterpriseSSOFirstFactors,\n shouldHandOffToEnterpriseConnection,\n shouldHandOffUnidentifiedToEnterpriseConnection,\n} from './enterpriseSSOFactors';\nimport { handleCombinedFlowTransfer } from './handleCombinedFlowTransfer';\nimport { isProtectCheckRequiredError, navigateOnSignInProtectGate } from './handleProtectCheck';\nimport { SIGN_IN_RESET_PASSWORD_INTENT_PARAM, useHandleAuthenticateWithPasskey } from './shared';\nimport { SignInAlternativePhoneCodePhoneNumberCard } from './SignInAlternativePhoneCodePhoneNumberCard';\nimport { SignInSocialButtons } from './SignInSocialButtons';\nimport {\n getPreferredAlternativePhoneChannel,\n getPreferredAlternativePhoneChannelForCombinedFlow,\n getSignUpAttributeFromIdentifier,\n} from './utils';\n\nconst useAutoFillPasskey = () => {\n const [isSupported, setIsSupported] = useState(false);\n const { navigate } = useRouter();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const { userSettings } = useEnvironment();\n const { passkeySettings, attributes } = userSettings;\n // @ts-expect-error - This is not a public API\n const { __internal_isWebAuthnAutofillSupported } = useClerk();\n\n useEffect(() => {\n async function runAutofillPasskey() {\n const _isSupported = await (__internal_isWebAuthnAutofillSupported ?? isWebAuthnAutofillSupported)();\n setIsSupported(_isSupported);\n if (!_isSupported) {\n return;\n }\n\n await authenticateWithPasskey({ flow: 'autofill' });\n }\n\n if (passkeySettings.allow_autofill && attributes.passkey?.enabled) {\n runAutofillPasskey();\n }\n }, []);\n\n return {\n isWebAuthnAutofillSupported: isSupported,\n };\n};\n\nfunction SignInStartInternal(): JSX.Element {\n const card = useCardState();\n const clerk = useClerk();\n const status = useLoadingStatus();\n const { userSettings, authConfig } = useEnvironment();\n const signIn = useCoreSignIn();\n const { navigate } = useRouter();\n const ctx = useSignInContext();\n const { afterSignInUrl, signUpUrl, waitlistUrl, isCombinedFlow, signUpIfMissingEnabled, navigateOnSetActive } = ctx;\n const supportEmail = useSupportEmail();\n const totalEnabledAuthMethods = useTotalEnabledAuthMethods();\n const identifierAttributes = useMemo<SignInStartIdentifier[]>(\n () => groupIdentifiers(userSettings.enabledFirstFactorIdentifiers),\n [userSettings.enabledFirstFactorIdentifiers],\n );\n const alternativePhoneCodeChannels = userSettings.alternativePhoneCodeChannels;\n\n /**\n * Passkeys\n */\n const { isWebAuthnAutofillSupported } = useAutoFillPasskey();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const isWebSupported = useIsWebAuthnSupported();\n\n const onlyPhoneNumberInitialValueExists =\n !!ctx.initialValues?.phoneNumber && !(ctx.initialValues.emailAddress || ctx.initialValues.username);\n const shouldStartWithPhoneNumberIdentifier =\n onlyPhoneNumberInitialValueExists && identifierAttributes.includes('phone_number');\n const [identifierAttribute, setIdentifierAttribute] = useState<SignInStartIdentifier>(\n shouldStartWithPhoneNumberIdentifier ? 'phone_number' : identifierAttributes[0] || '',\n );\n const [hasSwitchedByAutofill, setHasSwitchedByAutofill] = useState(false);\n\n const organizationTicket = getClerkQueryParam('__clerk_ticket') || '';\n const clerkStatus = getClerkQueryParam('__clerk_status') || '';\n\n const standardFormAttributes = userSettings.enabledFirstFactorIdentifiers;\n const web3FirstFactors = userSettings.web3FirstFactors;\n const authenticatableSocialStrategies = userSettings.authenticatableSocialStrategies;\n const passwordBasedInstance = userSettings.instanceIsPasswordBased;\n const { currentIdentifier, nextIdentifier } = getIdentifierControlDisplayValues(\n identifierAttributes,\n identifierAttribute,\n );\n const instantPasswordField = useFormControl('password', '', {\n type: 'password',\n label: localizationKeys('formFieldLabel__password'),\n placeholder: localizationKeys('formFieldInputPlaceholder__password') as any,\n });\n\n const [alternativePhoneCodeProvider, setAlternativePhoneCodeProvider] = useState<PhoneCodeChannelData | null>(null);\n\n const showAlternativePhoneCodeProviders = userSettings.alternativePhoneCodeChannels.length > 0;\n\n const onAlternativePhoneCodeUseAnotherMethod = () => {\n setAlternativePhoneCodeProvider(null);\n };\n const onAlternativePhoneCodeProviderClick = (phoneCodeChannel: PhoneCodeChannel) => {\n const provider: PhoneCodeChannelData | null = getAlternativePhoneCodeProviderData(phoneCodeChannel) || null;\n setAlternativePhoneCodeProvider(provider);\n };\n\n const ctxInitialValues = ctx.initialValues || {};\n const initialValues: Record<SignInStartIdentifier, string | undefined> = useMemo(\n () => ({\n email_address: ctxInitialValues.emailAddress,\n email_address_username: ctxInitialValues.emailAddress || ctxInitialValues.username,\n username: ctxInitialValues.username,\n phone_number: ctxInitialValues.phoneNumber,\n }),\n [ctx.initialValues],\n );\n\n const hasSocialOrWeb3Buttons =\n !!authenticatableSocialStrategies.length || !!web3FirstFactors.length || !!alternativePhoneCodeChannels.length;\n const [shouldAutofocus, setShouldAutofocus] = useState(!isMobileDevice() && !hasSocialOrWeb3Buttons);\n // When the captcha escalates to an interactive challenge, spotlight it by collapsing/inerting the\n // rest of the card (see the descriptors.main column below).\n const [captchaIsInteractive, setCaptchaIsInteractive] = useState(false);\n const textIdentifierField = useFormControl('identifier', initialValues[identifierAttribute] || '', {\n ...currentIdentifier,\n isRequired: true,\n transformer: value => value.trim(),\n });\n\n const phoneIdentifierField = useFormControl('identifier', initialValues['phone_number'] || '', {\n ...currentIdentifier,\n isRequired: true,\n });\n\n const identifierField = identifierAttribute === 'phone_number' ? phoneIdentifierField : textIdentifierField;\n\n const switchToNextIdentifier = () => {\n setIdentifierAttribute(\n i => identifierAttributes[(identifierAttributes.indexOf(i) + 1) % identifierAttributes.length],\n );\n setShouldAutofocus(true);\n setHasSwitchedByAutofill(false);\n };\n\n const handlePhoneNumberPaste = (value: string) => {\n textIdentifierField.setValue(initialValues[identifierAttribute] || '');\n phoneIdentifierField.setValue(value);\n setIdentifierAttribute('phone_number');\n setShouldAutofocus(true);\n };\n\n // switch to the phone input (if available) if a \"+\" is entered\n // (either by the browser or the user)\n // this does not work in chrome as it does not fire the change event and the value is\n // not available via js\n useLayoutEffect(() => {\n if (\n identifierField.value.startsWith('+') &&\n identifierAttributes.includes('phone_number') &&\n identifierAttribute !== 'phone_number' &&\n !hasSwitchedByAutofill\n ) {\n handlePhoneNumberPaste(identifierField.value);\n // do not switch automatically on subsequent autofills\n // by the browser to avoid a switch loop\n setHasSwitchedByAutofill(true);\n }\n }, [identifierField.value, identifierAttributes]);\n\n const buildSignInParams = (fields: Array<FormControlState<string>>): SignInCreateParams => {\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n\n /**\n * FAPI will return an error when password is submitted but the user's email matches requires enterprise sso authentication.\n * We need to strip password from the create request, and reconstruct it later.\n */\n if (!hasPassword || userSettings.enterpriseSSO.enabled) {\n fields = fields.filter(f => f.name !== 'password');\n }\n return {\n ...buildRequest(fields),\n ...(hasPassword && !userSettings.enterpriseSSO.enabled && { strategy: 'password' }),\n } as SignInCreateParams;\n };\n\n const safePasswordSignInForEnterpriseSSOInstance = (\n signInCreatePromise: Promise<SignInResource>,\n fields: Array<FormControlState<string>>,\n ) => {\n return signInCreatePromise.then(signInResource => {\n if (!userSettings.enterpriseSSO.enabled) {\n return signInResource;\n }\n /**\n * For instances with Enterprise SSO enabled, perform sign in with password only when it is allowed for the identified user.\n */\n const passwordField = fields.find(f => f.name === 'password')?.value;\n if (!passwordField || signInResource.supportedFirstFactors?.some(ff => ff.strategy === 'enterprise_sso')) {\n return signInResource;\n }\n return signInResource.attemptFirstFactor({ strategy: 'password', password: passwordField });\n });\n };\n\n const signInWithFields = async (\n fields: Array<FormControlState<string>>,\n options?: { resetPasswordIntent?: boolean },\n ) => {\n // If the user has already selected an alternative phone code provider, we use that.\n const preferredAlternativePhoneChannel =\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannel(fields, authConfig.preferredChannels, 'identifier');\n if (preferredAlternativePhoneChannel) {\n // We need to send the alternative phone code provider channel in the sign in request\n // together with the phone_code strategy, in order for FAPI to create a Verification upon this first request.\n const noop = () => {};\n fields.push({\n id: 'strategy',\n value: 'phone_code',\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n fields.push({\n id: 'channel',\n value: preferredAlternativePhoneChannel,\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n }\n try {\n // On top of the context-level preconditions, sign-up-if-missing only\n // supports identifiers that can be verified out-of-band.\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n const signUpAttribute = getSignUpAttributeFromIdentifier(identifierField);\n const shouldSignUpIfMissing = signUpIfMissingEnabled && signUpAttribute !== 'username' && !hasPassword;\n\n const res = await safePasswordSignInForEnterpriseSSOInstance(\n signIn.create({\n ...buildSignInParams(fields),\n ...(shouldSignUpIfMissing && { signUpIfMissing: true }),\n }),\n fields,\n );\n\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n\n switch (res.status) {\n case 'needs_identifier':\n // Check if we need to initiate an enterprise sso flow\n if (shouldHandOffUnidentifiedToEnterpriseConnection(res)) {\n await authenticateWithEnterpriseSSO();\n }\n break;\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n if (options?.resetPasswordIntent) {\n return navigate('factor-one', {\n searchParams: new URLSearchParams({ [SIGN_IN_RESET_PASSWORD_INTENT_PARAM]: 'true' }),\n });\n }\n return navigate('factor-one');\n }\n\n // Awaited so a failed hand-off reaches the catch below instead of escaping this try.\n return await authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n } catch (e: any) {\n return attemptToRecoverFromSignInError(e);\n }\n };\n\n const authenticateWithEnterpriseSSO = async () => {\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n\n try {\n await signIn.authenticateWithRedirect({\n strategy: 'enterprise_sso',\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n continueSignIn: true,\n });\n } catch (err) {\n // Preparing the hand-off can itself raise a challenge. No redirect was issued and the sign-in\n // is sitting on the gate instead. Handled here because the callers' recovery path drops\n // errors that didn't come from the API.\n if (isProtectCheckRequiredError(err) && navigateOnSignInProtectGate(signIn, navigate, 'protect-check')) {\n return;\n }\n throw err;\n }\n };\n\n const attemptToRecoverFromSignInError = async (e: any) => {\n if (!e.errors) {\n return;\n }\n const instantPasswordError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVALID_STRATEGY_FOR_USER ||\n e.code === ERROR_CODES.FORM_PASSWORD_INCORRECT ||\n e.code === ERROR_CODES.FORM_PASSWORD_PWNED,\n );\n\n const sessionAlreadyExistsError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n const alreadySignedInError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === 'identifier_already_signed_in',\n );\n const accountDoesNotExistError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVITATION_ACCOUNT_NOT_EXISTS || e.code === ERROR_CODES.FORM_IDENTIFIER_NOT_FOUND,\n );\n\n if (instantPasswordError) {\n await signInWithFields([identifierField]);\n } else if (sessionAlreadyExistsError) {\n await clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (alreadySignedInError) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const sid = alreadySignedInError.meta!.sessionId!;\n await clerk.setActive({\n session: sid,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (isCombinedFlow && accountDoesNotExistError) {\n const attribute = getSignUpAttributeFromIdentifier(identifierField);\n\n if (userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST) {\n const waitlistUrl = clerk.buildWaitlistUrl(\n attribute === 'emailAddress'\n ? {\n initialValues: {\n [attribute]: identifierField.value,\n },\n }\n : {},\n );\n return navigate(waitlistUrl);\n }\n\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n\n return handleCombinedFlowTransfer({\n afterSignUpUrl: ctx.afterSignUpUrl || '/',\n clerk,\n handleError: e => handleError(e, [identifierField, instantPasswordField], card.setError),\n identifierAttribute: attribute,\n identifierValue: identifierField.value,\n navigate,\n organizationTicket,\n signUpMode: userSettings.signUp.mode,\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n navigateOnSetActive,\n passwordEnabled: userSettings.attributes.password?.required ?? false,\n alternativePhoneCodeChannel:\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannelForCombinedFlow(\n authConfig.preferredChannels,\n attribute,\n identifierField.value,\n ),\n unsafeMetadata: ctx.unsafeMetadata,\n });\n } else {\n handleError(e, [identifierField, instantPasswordField], card.setError);\n }\n };\n\n useEffect(() => {\n if (!organizationTicket) {\n return;\n }\n\n if (clerkStatus === 'sign_up') {\n const paramsToForward = new URLSearchParams();\n if (organizationTicket) {\n paramsToForward.set('__clerk_ticket', organizationTicket);\n }\n // We explicitly navigate to 'create' in the combined flow to trigger a client-side navigation. Navigating to\n // signUpUrl triggers a full page reload when used with the hash router.\n void navigate(isCombinedFlow ? `create` : signUpUrl, { searchParams: paramsToForward });\n return;\n }\n\n status.setLoading();\n card.setLoading();\n signIn\n .create({\n strategy: 'ticket',\n ticket: organizationTicket,\n })\n .then(res => {\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n switch (res.status) {\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n return navigate('factor-one');\n }\n\n return authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n removeClerkQueryParam('__clerk_ticket');\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n })\n .catch(err => {\n return attemptToRecoverFromSignInError(err);\n })\n .finally(() => {\n // Keep the card in loading state during SSO redirect to prevent UI flicker\n // This is necessary because there's a brief delay between initiating the SSO flow\n // and the actual redirect to the external Identity Provider\n const isRedirectingToSSOProvider = !!hasOnlyEnterpriseSSOFirstFactors(signIn);\n if (isRedirectingToSSOProvider) {\n return;\n }\n\n status.setIdle();\n card.setIdle();\n });\n }, []);\n\n useEffect(() => {\n async function handleOauthError() {\n const defaultErrorHandler = () => {\n // Error from server may be too much information for the end user, so set a generic error\n card.setError('Unable to complete action at this time. If the problem persists please contact support.');\n };\n\n const error = signIn?.firstFactorVerification?.error;\n if (error) {\n switch (error.code) {\n case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:\n case ERROR_CODES.OAUTH_ACCESS_DENIED:\n case ERROR_CODES.NOT_ALLOWED_ACCESS:\n case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:\n case ERROR_CODES.USER_LOCKED:\n case ERROR_CODES.EXTERNAL_ACCOUNT_NOT_FOUND:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED_WAITLIST:\n case ERROR_CODES.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:\n case ERROR_CODES.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:\n case ERROR_CODES.CAPTCHA_INVALID:\n case ERROR_CODES.FRAUD_DEVICE_BLOCKED:\n case ERROR_CODES.FRAUD_ACTION_BLOCKED:\n case ERROR_CODES.SIGNUP_RATE_LIMIT_EXCEEDED:\n case ERROR_CODES.USER_BANNED:\n case ERROR_CODES.USER_DEACTIVATED:\n card.setError(error);\n break;\n default:\n defaultErrorHandler();\n }\n\n // TODO: This is a workaround in order to reset the sign in attempt\n // so that the oauth error does not persist on full page reloads.\n void (await signIn.create({}));\n }\n }\n\n void handleOauthError();\n }, []);\n\n const handleFirstPartySubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n return signInWithFields([identifierField, instantPasswordField]);\n };\n\n const handleForgotPasswordClick: React.MouseEventHandler = e => {\n e.preventDefault();\n // Surface the same native required-field validation as the Continue button\n // when the identifier is missing\n const form = e.currentTarget.closest('form');\n if (form && !form.reportValidity()) {\n return;\n }\n void signInWithFields([identifierField], { resetPasswordIntent: true });\n };\n\n const DynamicField = useMemo(() => {\n const components = {\n tel: Form.PhoneInput,\n password: Form.PasswordInput,\n text: Form.PlainInput,\n email: Form.PlainInput,\n };\n\n return components[identifierField.type as keyof typeof components];\n }, [identifierField.type]);\n\n if (status.isLoading || clerkStatus === 'sign_up') {\n // clerkStatus being sign_up will trigger a navigation to the sign up flow, so show a loading card instead of\n // rendering the sign in flow.\n return <LoadingCard />;\n }\n\n // @ts-expect-error `action` is not typed\n const { action, validLastAuthenticationStrategies, ...identifierFieldProps } = identifierField.props;\n\n const lastAuthenticationStrategy = clerk.client?.lastAuthenticationStrategy;\n const isIdentifierLastAuthenticationStrategy =\n lastAuthenticationStrategy && totalEnabledAuthMethods > 1\n ? validLastAuthenticationStrategies?.has(lastAuthenticationStrategy)\n : false;\n\n const blockedDetails = actionBlockedDetailsFrom(card.rawError);\n if (blockedDetails) {\n return <ActionBlockedCard details={blockedDetails} />;\n }\n\n return (\n <Flow.Part part='start'>\n {!alternativePhoneCodeProvider ? (\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.titleCombined')\n : localizationKeys('signIn.start.title')\n }\n />\n <Header.Subtitle\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.subtitleCombined')\n : localizationKeys('signIn.start.subtitle')\n }\n sx={{\n '&:empty': {\n display: 'none',\n },\n }}\n />\n </Header.Root>\n <Card.Alert>{card.error}</Card.Alert>\n {/*TODO: extract main in its own component */}\n <Col\n elementDescriptor={descriptors.main}\n gap={6}\n {...inertProps(captchaIsInteractive)}\n // `display:none` (not `visibility:hidden`) so the collapsed column leaves flex flow and\n // contributes no `gap` gutter to `Card.Content` — otherwise it injects empty space above\n // the spotlighted captcha. Subtree stays mounted (form state preserved); `inert` is then\n // redundant-but-harmless.\n sx={captchaIsInteractive ? { display: 'none' } : undefined}\n >\n <SocialButtonsReversibleContainerWithDivider>\n {hasSocialOrWeb3Buttons && (\n <SignInSocialButtons\n enableWeb3Providers\n enableOAuthProviders\n enableAlternativePhoneCodeProviders={showAlternativePhoneCodeProviders}\n onAlternativePhoneCodeProviderClick={onAlternativePhoneCodeProviderClick}\n />\n )}\n {standardFormAttributes.length ? (\n <Form.Root\n onSubmit={handleFirstPartySubmit}\n gap={8}\n >\n <Col gap={6}>\n <Form.ControlRow elementId={identifierField.id}>\n <DynamicField\n actionLabel={nextIdentifier?.action}\n onActionClicked={switchToNextIdentifier}\n {...identifierFieldProps}\n autoFocus={shouldAutofocus}\n autoComplete={\n isWebAuthnAutofillSupported\n ? `${currentIdentifier.autoComplete} webauthn`\n : currentIdentifier.autoComplete\n }\n isLastAuthenticationStrategy={isIdentifierLastAuthenticationStrategy}\n />\n </Form.ControlRow>\n <InstantPasswordRow\n field={passwordBasedInstance ? instantPasswordField : undefined}\n onForgotPasswordClick={handleForgotPasswordClick}\n />\n </Col>\n <Col center>\n <Form.SubmitButton hasArrow />\n </Col>\n </Form.Root>\n ) : null}\n </SocialButtonsReversibleContainerWithDivider>\n </Col>\n <CaptchaElement\n gapless\n onInteractiveChange={setCaptchaIsInteractive}\n />\n {/* Kept outside descriptors.main so the spotlight's `inert` leaves this alternative action reachable. */}\n {userSettings.attributes.passkey?.enabled &&\n userSettings.passkeySettings.show_sign_in_button &&\n isWebSupported && (\n <Card.Action elementId={'usePasskey'}>\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__use_passkey')}\n onClick={() => authenticateWithPasskey({ flow: 'discoverable' })}\n />\n </Card.Action>\n )}\n </Card.Content>\n <Card.Footer>\n {userSettings.signUp.mode === SIGN_UP_MODES.PUBLIC && !isCombinedFlow && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink')}\n to={clerk.buildUrlWithAuth(signUpUrl)}\n />\n </Card.Action>\n )}\n {userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText__join_waitlist')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__join_waitlist')}\n to={clerk.buildUrlWithAuth(waitlistUrl)}\n />\n </Card.Action>\n )}\n </Card.Footer>\n </Card.Root>\n ) : (\n <SignInAlternativePhoneCodePhoneNumberCard\n handleSubmit={handleFirstPartySubmit}\n phoneNumberFormState={phoneIdentifierField}\n onUseAnotherMethod={onAlternativePhoneCodeUseAnotherMethod}\n phoneCodeProvider={alternativePhoneCodeProvider}\n />\n )}\n </Flow.Part>\n );\n}\n\nconst InstantPasswordRow = ({\n field,\n onForgotPasswordClick,\n}: {\n field?: FormControlState<'password'>;\n onForgotPasswordClick?: React.MouseEventHandler;\n}) => {\n const [autofilled, setAutofilled] = useState(false);\n const ref = useRef<HTMLInputElement>(null);\n const show = !!(autofilled || field?.value);\n\n // show password if it's autofilled by the browser\n useLayoutEffect(() => {\n const intervalId = setInterval(() => {\n if (ref?.current) {\n const autofilled =\n window.getComputedStyle(ref.current, ':autofill').animationName === 'onAutoFillStart' ||\n // https://github.com/facebook/react/issues/1159#issuecomment-1025423604\n !!ref.current?.matches('*:-webkit-autofill');\n if (autofilled) {\n setAutofilled(autofilled);\n clearInterval(intervalId);\n }\n }\n }, 500);\n\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n useEffect(() => {\n //if the field receives a value, we default to normal behaviour\n if (field?.value && field.value !== '') {\n setAutofilled(false);\n }\n }, [field?.value]);\n\n if (!field) {\n return null;\n }\n\n return (\n <Form.ControlRow\n elementId={field.id}\n aria-hidden={show ? undefined : true}\n sx={\n show\n ? undefined\n : {\n position: 'absolute',\n opacity: 0,\n height: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n marginTop: '-1rem',\n }\n }\n >\n <Form.PasswordInput\n {...field.props}\n actionLabel={show ? localizationKeys('formFieldAction__forgotPassword') : undefined}\n onActionClicked={show ? onForgotPasswordClick : undefined}\n tabIndex={show ? undefined : -1}\n ref={ref}\n />\n </Form.ControlRow>\n );\n};\n\nexport const SignInStart = withRedirectToSignInTask(\n withRedirectToAfterSignIn(withCardStateProvider(SignInStartInternal)),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,2BAA2B;CAC/B,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,uBAAuB,SAAS,YAAY;CAClD,MAAM,0BAA0B,iCAAiC,gBAAgB,eAAe;CAChG,MAAM,EAAE,iBAAiB,eAAe;CACxC,MAAM,EAAE,iBAAiB,eAAe;CAExC,MAAM,EAAE,2CAA2C,SAAS;CAE5D,gBAAgB;EACd,eAAe,qBAAqB;GAClC,MAAM,eAAe,OAAO,0CAA0C,4BAA2B,CAAE;GACnG,eAAe,YAAY;GAC3B,IAAI,CAAC,cACH;GAGF,MAAM,wBAAwB,EAAE,MAAM,WAAW,CAAC;EACpD;EAEA,IAAI,gBAAgB,kBAAkB,WAAW,SAAS,SACxD,mBAAmB;CAEvB,GAAG,CAAC,CAAC;CAEL,OAAO,EACL,6BAA6B,YAC/B;AACF;AAEA,SAAS,sBAAmC;CAC1C,MAAM,OAAO,aAAa;CAC1B,MAAM,QAAQ,SAAS;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,cAAc,eAAe,eAAe;CACpD,MAAM,SAAS,cAAc;CAC7B,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,MAAM,iBAAiB;CAC7B,MAAM,EAAE,gBAAgB,WAAW,aAAa,gBAAgB,wBAAwB,wBAAwB;CAChH,MAAM,eAAe,gBAAgB;CACrC,MAAM,0BAA0B,2BAA2B;CAC3D,MAAM,uBAAuB,cACrB,iBAAiB,aAAa,6BAA6B,GACjE,CAA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OAAO,KAAK,CAAC;CAEjB,IAAI,CAAC,OACH,OAAO;CAGT,OACE,oBAAC,KAAK,YAAN;EACE,WAAW,MAAM;EACjB,eAAa,OAAO,SAAY;EAChC,IACE,OACI,SACA;GACE,UAAU;GACV,SAAS;GACT,QAAQ;GACR,UAAU;GACV,eAAe;GACf,WAAW;EACb;YAGN,oBAAC,KAAK,eAAN;GACE,GAAI,MAAM;GACV,aAAa,OAAO,iBAAiB,iCAAiC,IAAI;GAC1E,iBAAiB,OAAO,wBAAwB;GAChD,UAAU,OAAO,SAAY;GACxB;EACN;CACc;AAErB;AAEA,MAAa,cAAc,yBACzB,0BAA0B,sBAAsB,mBAAmB,CAAC,CACtE"}
|
|
1
|
+
{"version":3,"file":"SignInStart.js","names":[],"sources":["../../../src/components/SignIn/SignInStart.tsx"],"sourcesContent":["import { getAlternativePhoneCodeProviderData } from '@clerk/shared/alternativePhoneCode';\nimport { inertProps } from '@clerk/shared/inert';\nimport { ERROR_CODES, SIGN_UP_MODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { clerkInvalidFAPIResponse } from '@clerk/shared/internal/clerk-js/errors';\nimport { getClerkQueryParam, removeClerkQueryParam } from '@clerk/shared/internal/clerk-js/queryParams';\nimport { useClerk } from '@clerk/shared/react';\nimport type {\n ClerkAPIError,\n PhoneCodeChannel,\n PhoneCodeChannelData,\n SignInCreateParams,\n SignInResource,\n} from '@clerk/shared/types';\nimport { isWebAuthnAutofillSupported } from '@clerk/shared/webauthn';\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { Card } from '@/ui/elements/Card';\nimport { useCardState, withCardStateProvider } from '@/ui/elements/contexts';\nimport { Form } from '@/ui/elements/Form';\nimport { Header } from '@/ui/elements/Header';\nimport { LoadingCard } from '@/ui/elements/LoadingCard';\nimport { SocialButtonsReversibleContainerWithDivider } from '@/ui/elements/ReversibleContainer';\nimport { actionBlockedDetailsFrom } from '@/ui/utils/actionBlocked';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { isMobileDevice } from '@/ui/utils/isMobileDevice';\nimport type { FormControlState } from '@/ui/utils/useFormControl';\nimport { buildRequest, useFormControl } from '@/ui/utils/useFormControl';\n\nimport type { SignInStartIdentifier } from '../../common';\nimport {\n ActionBlockedCard,\n getIdentifierControlDisplayValues,\n groupIdentifiers,\n withRedirectToAfterSignIn,\n withRedirectToSignInTask,\n} from '../../common';\nimport { useCoreSignIn, useEnvironment, useSignInContext } from '../../contexts';\nimport { Col, descriptors, Flow, localizationKeys } from '../../customizables';\nimport { CaptchaElement } from '../../elements/CaptchaElement';\nimport { useIsWebAuthnSupported, useLoadingStatus } from '../../hooks';\nimport { useSupportEmail } from '../../hooks/useSupportEmail';\nimport { useTotalEnabledAuthMethods } from '../../hooks/useTotalEnabledAuthMethods';\nimport { useRouter } from '../../router';\nimport {\n hasOnlyEnterpriseSSOFirstFactors,\n shouldHandOffToEnterpriseConnection,\n shouldHandOffUnidentifiedToEnterpriseConnection,\n} from './enterpriseSSOFactors';\nimport { handleCombinedFlowTransfer } from './handleCombinedFlowTransfer';\nimport { isProtectCheckRequiredError, navigateOnSignInProtectGate } from './handleProtectCheck';\nimport { SIGN_IN_RESET_PASSWORD_INTENT_PARAM, useHandleAuthenticateWithPasskey } from './shared';\nimport { SignInAlternativePhoneCodePhoneNumberCard } from './SignInAlternativePhoneCodePhoneNumberCard';\nimport { SignInSocialButtons } from './SignInSocialButtons';\nimport {\n getPreferredAlternativePhoneChannel,\n getPreferredAlternativePhoneChannelForCombinedFlow,\n getSignUpAttributeFromIdentifier,\n} from './utils';\n\nconst useAutoFillPasskey = () => {\n const [isSupported, setIsSupported] = useState(false);\n const { navigate } = useRouter();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const { userSettings } = useEnvironment();\n const { passkeySettings, attributes } = userSettings;\n // @ts-expect-error - This is not a public API\n const { __internal_isWebAuthnAutofillSupported } = useClerk();\n\n useEffect(() => {\n async function runAutofillPasskey() {\n const _isSupported = await (__internal_isWebAuthnAutofillSupported ?? isWebAuthnAutofillSupported)();\n setIsSupported(_isSupported);\n if (!_isSupported) {\n return;\n }\n\n await authenticateWithPasskey({ flow: 'autofill' });\n }\n\n if (passkeySettings.allow_autofill && attributes.passkey?.enabled) {\n runAutofillPasskey();\n }\n }, []);\n\n return {\n isWebAuthnAutofillSupported: isSupported,\n };\n};\n\nfunction SignInStartInternal(): JSX.Element {\n const card = useCardState();\n const clerk = useClerk();\n const status = useLoadingStatus();\n const { userSettings, authConfig } = useEnvironment();\n const signIn = useCoreSignIn();\n const { navigate } = useRouter();\n const ctx = useSignInContext();\n const { afterSignInUrl, signUpUrl, waitlistUrl, isCombinedFlow, signUpIfMissingEnabled, navigateOnSetActive } = ctx;\n const supportEmail = useSupportEmail();\n const totalEnabledAuthMethods = useTotalEnabledAuthMethods();\n const identifierAttributes = useMemo<SignInStartIdentifier[]>(\n () => groupIdentifiers(userSettings.enabledFirstFactorIdentifiers),\n [userSettings.enabledFirstFactorIdentifiers],\n );\n const alternativePhoneCodeChannels = userSettings.alternativePhoneCodeChannels;\n\n /**\n * Passkeys\n */\n const { isWebAuthnAutofillSupported } = useAutoFillPasskey();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const isWebSupported = useIsWebAuthnSupported();\n\n const onlyPhoneNumberInitialValueExists =\n !!ctx.initialValues?.phoneNumber && !(ctx.initialValues.emailAddress || ctx.initialValues.username);\n const shouldStartWithPhoneNumberIdentifier =\n onlyPhoneNumberInitialValueExists && identifierAttributes.includes('phone_number');\n const [identifierAttribute, setIdentifierAttribute] = useState<SignInStartIdentifier>(\n shouldStartWithPhoneNumberIdentifier ? 'phone_number' : identifierAttributes[0] || '',\n );\n const [hasSwitchedByAutofill, setHasSwitchedByAutofill] = useState(false);\n\n const organizationTicket = getClerkQueryParam('__clerk_ticket') || '';\n const clerkStatus = getClerkQueryParam('__clerk_status') || '';\n\n const standardFormAttributes = userSettings.enabledFirstFactorIdentifiers;\n const web3FirstFactors = userSettings.web3FirstFactors;\n const authenticatableSocialStrategies = userSettings.authenticatableSocialStrategies;\n const passwordBasedInstance = userSettings.instanceIsPasswordBased;\n const { currentIdentifier, nextIdentifier } = getIdentifierControlDisplayValues(\n identifierAttributes,\n identifierAttribute,\n );\n const instantPasswordField = useFormControl('password', '', {\n type: 'password',\n label: localizationKeys('formFieldLabel__password'),\n placeholder: localizationKeys('formFieldInputPlaceholder__password') as any,\n });\n\n const [alternativePhoneCodeProvider, setAlternativePhoneCodeProvider] = useState<PhoneCodeChannelData | null>(null);\n\n const showAlternativePhoneCodeProviders = userSettings.alternativePhoneCodeChannels.length > 0;\n\n const onAlternativePhoneCodeUseAnotherMethod = () => {\n setAlternativePhoneCodeProvider(null);\n };\n const onAlternativePhoneCodeProviderClick = (phoneCodeChannel: PhoneCodeChannel) => {\n const provider: PhoneCodeChannelData | null = getAlternativePhoneCodeProviderData(phoneCodeChannel) || null;\n setAlternativePhoneCodeProvider(provider);\n };\n\n const ctxInitialValues = ctx.initialValues || {};\n const initialValues: Record<SignInStartIdentifier, string | undefined> = useMemo(\n () => ({\n email_address: ctxInitialValues.emailAddress,\n email_address_username: ctxInitialValues.emailAddress || ctxInitialValues.username,\n username: ctxInitialValues.username,\n phone_number: ctxInitialValues.phoneNumber,\n }),\n [ctx.initialValues],\n );\n\n const hasSocialOrWeb3Buttons =\n !!authenticatableSocialStrategies.length || !!web3FirstFactors.length || !!alternativePhoneCodeChannels.length;\n const [shouldAutofocus, setShouldAutofocus] = useState(!isMobileDevice() && !hasSocialOrWeb3Buttons);\n // When the captcha escalates to an interactive challenge, spotlight it by collapsing/inerting the\n // rest of the card (see the descriptors.main column below).\n const [captchaIsInteractive, setCaptchaIsInteractive] = useState(false);\n const textIdentifierField = useFormControl('identifier', initialValues[identifierAttribute] || '', {\n ...currentIdentifier,\n isRequired: true,\n transformer: value => value.trim(),\n });\n\n const phoneIdentifierField = useFormControl('identifier', initialValues['phone_number'] || '', {\n ...currentIdentifier,\n isRequired: true,\n });\n\n const identifierField = identifierAttribute === 'phone_number' ? phoneIdentifierField : textIdentifierField;\n\n const switchToNextIdentifier = () => {\n setIdentifierAttribute(\n i => identifierAttributes[(identifierAttributes.indexOf(i) + 1) % identifierAttributes.length],\n );\n setShouldAutofocus(true);\n setHasSwitchedByAutofill(false);\n };\n\n const handlePhoneNumberPaste = (value: string) => {\n textIdentifierField.setValue(initialValues[identifierAttribute] || '');\n phoneIdentifierField.setValue(value);\n setIdentifierAttribute('phone_number');\n setShouldAutofocus(true);\n };\n\n // switch to the phone input (if available) if a \"+\" is entered\n // (either by the browser or the user)\n // this does not work in chrome as it does not fire the change event and the value is\n // not available via js\n useLayoutEffect(() => {\n if (\n identifierField.value.startsWith('+') &&\n identifierAttributes.includes('phone_number') &&\n identifierAttribute !== 'phone_number' &&\n !hasSwitchedByAutofill\n ) {\n handlePhoneNumberPaste(identifierField.value);\n // do not switch automatically on subsequent autofills\n // by the browser to avoid a switch loop\n setHasSwitchedByAutofill(true);\n }\n }, [identifierField.value, identifierAttributes]);\n\n const buildSignInParams = (fields: Array<FormControlState<string>>): SignInCreateParams => {\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n\n /**\n * FAPI will return an error when password is submitted but the user's email matches requires enterprise sso authentication.\n * We need to strip password from the create request, and reconstruct it later.\n */\n if (!hasPassword || userSettings.enterpriseSSO.enabled) {\n fields = fields.filter(f => f.name !== 'password');\n }\n return {\n ...buildRequest(fields),\n ...(hasPassword && !userSettings.enterpriseSSO.enabled && { strategy: 'password' }),\n } as SignInCreateParams;\n };\n\n const safePasswordSignInForEnterpriseSSOInstance = (\n signInCreatePromise: Promise<SignInResource>,\n fields: Array<FormControlState<string>>,\n ) => {\n return signInCreatePromise.then(signInResource => {\n if (!userSettings.enterpriseSSO.enabled) {\n return signInResource;\n }\n /**\n * For instances with Enterprise SSO enabled, perform sign in with password only when it is allowed for the identified user.\n */\n const passwordField = fields.find(f => f.name === 'password')?.value;\n if (!passwordField || signInResource.supportedFirstFactors?.some(ff => ff.strategy === 'enterprise_sso')) {\n return signInResource;\n }\n return signInResource.attemptFirstFactor({ strategy: 'password', password: passwordField });\n });\n };\n\n const signInWithFields = async (\n fields: Array<FormControlState<string>>,\n options?: { resetPasswordIntent?: boolean },\n ) => {\n // If the user has already selected an alternative phone code provider, we use that.\n const preferredAlternativePhoneChannel =\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannel(fields, authConfig.preferredChannels, 'identifier');\n if (preferredAlternativePhoneChannel) {\n // We need to send the alternative phone code provider channel in the sign in request\n // together with the phone_code strategy, in order for FAPI to create a Verification upon this first request.\n const noop = () => {};\n fields.push({\n id: 'strategy',\n value: 'phone_code',\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n fields.push({\n id: 'channel',\n value: preferredAlternativePhoneChannel,\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n }\n try {\n // On top of the context-level preconditions, sign-up-if-missing only\n // supports identifiers that can be verified out-of-band.\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n const signUpAttribute = getSignUpAttributeFromIdentifier(identifierField);\n const shouldSignUpIfMissing = signUpIfMissingEnabled && signUpAttribute !== 'username' && !hasPassword;\n\n const res = await safePasswordSignInForEnterpriseSSOInstance(\n signIn.create({\n ...buildSignInParams(fields),\n ...(shouldSignUpIfMissing && { signUpIfMissing: true }),\n }),\n fields,\n );\n\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n\n switch (res.status) {\n case 'needs_identifier':\n // Check if we need to initiate an enterprise sso flow\n if (shouldHandOffUnidentifiedToEnterpriseConnection(res)) {\n await authenticateWithEnterpriseSSO();\n }\n break;\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n if (options?.resetPasswordIntent) {\n return navigate('factor-one', {\n searchParams: new URLSearchParams({ [SIGN_IN_RESET_PASSWORD_INTENT_PARAM]: 'true' }),\n });\n }\n return navigate('factor-one');\n }\n\n // Awaited so a failed hand-off reaches the catch below instead of escaping this try.\n return await authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n } catch (e: any) {\n return attemptToRecoverFromSignInError(e);\n }\n };\n\n const authenticateWithEnterpriseSSO = async () => {\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n\n try {\n await signIn.authenticateWithRedirect({\n strategy: 'enterprise_sso',\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n continueSignIn: true,\n });\n } catch (err) {\n // Preparing the hand-off can itself raise a challenge. No redirect was issued and the sign-in\n // is sitting on the gate instead. Handled here because the callers' recovery path drops\n // errors that didn't come from the API.\n if (isProtectCheckRequiredError(err) && navigateOnSignInProtectGate(signIn, navigate, 'protect-check')) {\n return;\n }\n throw err;\n }\n };\n\n const attemptToRecoverFromSignInError = async (e: any) => {\n if (!e.errors) {\n return;\n }\n const instantPasswordError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVALID_STRATEGY_FOR_USER ||\n e.code === ERROR_CODES.FORM_PASSWORD_INCORRECT ||\n e.code === ERROR_CODES.FORM_PASSWORD_PWNED,\n );\n\n const sessionAlreadyExistsError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n const alreadySignedInError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === 'identifier_already_signed_in',\n );\n const accountDoesNotExistError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVITATION_ACCOUNT_NOT_EXISTS || e.code === ERROR_CODES.FORM_IDENTIFIER_NOT_FOUND,\n );\n\n if (instantPasswordError) {\n await signInWithFields([identifierField]);\n } else if (sessionAlreadyExistsError) {\n await clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (alreadySignedInError) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const sid = alreadySignedInError.meta!.sessionId!;\n await clerk.setActive({\n session: sid,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (isCombinedFlow && accountDoesNotExistError) {\n const attribute = getSignUpAttributeFromIdentifier(identifierField);\n\n if (userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST) {\n const waitlistUrl = clerk.buildWaitlistUrl(\n attribute === 'emailAddress'\n ? {\n initialValues: {\n [attribute]: identifierField.value,\n },\n }\n : {},\n );\n return navigate(waitlistUrl);\n }\n\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n\n return handleCombinedFlowTransfer({\n afterSignUpUrl: ctx.afterSignUpUrl || '/',\n clerk,\n handleError: e => handleError(e, [identifierField, instantPasswordField], card.setError),\n identifierAttribute: attribute,\n identifierValue: identifierField.value,\n navigate,\n organizationTicket,\n signUpMode: userSettings.signUp.mode,\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n navigateOnSetActive,\n passwordEnabled: userSettings.attributes.password?.required ?? false,\n alternativePhoneCodeChannel:\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannelForCombinedFlow(\n authConfig.preferredChannels,\n attribute,\n identifierField.value,\n ),\n unsafeMetadata: ctx.unsafeMetadata,\n });\n } else {\n handleError(e, [identifierField, instantPasswordField], card.setError);\n }\n };\n\n useEffect(() => {\n if (!organizationTicket) {\n return;\n }\n\n if (clerkStatus === 'sign_up') {\n const paramsToForward = new URLSearchParams();\n if (organizationTicket) {\n paramsToForward.set('__clerk_ticket', organizationTicket);\n }\n // We explicitly navigate to 'create' in the combined flow to trigger a client-side navigation. Navigating to\n // signUpUrl triggers a full page reload when used with the hash router.\n void navigate(isCombinedFlow ? `create` : signUpUrl, { searchParams: paramsToForward });\n return;\n }\n\n status.setLoading();\n card.setLoading();\n signIn\n .create({\n strategy: 'ticket',\n ticket: organizationTicket,\n })\n .then(res => {\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n switch (res.status) {\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n return navigate('factor-one');\n }\n\n return authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n removeClerkQueryParam('__clerk_ticket');\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n })\n .catch(err => {\n return attemptToRecoverFromSignInError(err);\n })\n .finally(() => {\n // Keep the card in loading state during SSO redirect to prevent UI flicker\n // This is necessary because there's a brief delay between initiating the SSO flow\n // and the actual redirect to the external Identity Provider\n const isRedirectingToSSOProvider = !!hasOnlyEnterpriseSSOFirstFactors(signIn);\n if (isRedirectingToSSOProvider) {\n return;\n }\n\n status.setIdle();\n card.setIdle();\n });\n }, []);\n\n useEffect(() => {\n async function handleOauthError() {\n const defaultErrorHandler = () => {\n // Error from server may be too much information for the end user, so set a generic error\n card.setError('Unable to complete action at this time. If the problem persists please contact support.');\n };\n\n const error = signIn?.firstFactorVerification?.error;\n if (error) {\n if (!card.error) {\n switch (error.code) {\n case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:\n case ERROR_CODES.OAUTH_ACCESS_DENIED:\n case ERROR_CODES.NOT_ALLOWED_ACCESS:\n case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:\n case ERROR_CODES.USER_LOCKED:\n case ERROR_CODES.EXTERNAL_ACCOUNT_NOT_FOUND:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED_WAITLIST:\n case ERROR_CODES.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:\n case ERROR_CODES.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:\n case ERROR_CODES.CAPTCHA_INVALID:\n case ERROR_CODES.FRAUD_DEVICE_BLOCKED:\n case ERROR_CODES.FRAUD_ACTION_BLOCKED:\n case ERROR_CODES.SIGNUP_RATE_LIMIT_EXCEEDED:\n case ERROR_CODES.USER_BANNED:\n case ERROR_CODES.USER_DEACTIVATED:\n card.setError(error);\n break;\n default:\n defaultErrorHandler();\n }\n }\n\n // TODO: This is a workaround in order to reset the sign in attempt\n // so that the oauth error does not persist on full page reloads.\n void (await signIn.create({}));\n }\n }\n\n void handleOauthError();\n }, []);\n\n const handleFirstPartySubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n return signInWithFields([identifierField, instantPasswordField]);\n };\n\n const handleForgotPasswordClick: React.MouseEventHandler = e => {\n e.preventDefault();\n // Surface the same native required-field validation as the Continue button\n // when the identifier is missing\n const form = e.currentTarget.closest('form');\n if (form && !form.reportValidity()) {\n return;\n }\n void signInWithFields([identifierField], { resetPasswordIntent: true });\n };\n\n const DynamicField = useMemo(() => {\n const components = {\n tel: Form.PhoneInput,\n password: Form.PasswordInput,\n text: Form.PlainInput,\n email: Form.PlainInput,\n };\n\n return components[identifierField.type as keyof typeof components];\n }, [identifierField.type]);\n\n if (status.isLoading || clerkStatus === 'sign_up') {\n // clerkStatus being sign_up will trigger a navigation to the sign up flow, so show a loading card instead of\n // rendering the sign in flow.\n return <LoadingCard />;\n }\n\n // @ts-expect-error `action` is not typed\n const { action, validLastAuthenticationStrategies, ...identifierFieldProps } = identifierField.props;\n\n const lastAuthenticationStrategy = clerk.client?.lastAuthenticationStrategy;\n const isIdentifierLastAuthenticationStrategy =\n lastAuthenticationStrategy && totalEnabledAuthMethods > 1\n ? validLastAuthenticationStrategies?.has(lastAuthenticationStrategy)\n : false;\n\n const blockedDetails = actionBlockedDetailsFrom(card.rawError);\n if (blockedDetails) {\n return <ActionBlockedCard details={blockedDetails} />;\n }\n\n return (\n <Flow.Part part='start'>\n {!alternativePhoneCodeProvider ? (\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.titleCombined')\n : localizationKeys('signIn.start.title')\n }\n />\n <Header.Subtitle\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.subtitleCombined')\n : localizationKeys('signIn.start.subtitle')\n }\n sx={{\n '&:empty': {\n display: 'none',\n },\n }}\n />\n </Header.Root>\n <Card.Alert>{card.error}</Card.Alert>\n {/*TODO: extract main in its own component */}\n <Col\n elementDescriptor={descriptors.main}\n gap={6}\n {...inertProps(captchaIsInteractive)}\n // `display:none` (not `visibility:hidden`) so the collapsed column leaves flex flow and\n // contributes no `gap` gutter to `Card.Content` — otherwise it injects empty space above\n // the spotlighted captcha. Subtree stays mounted (form state preserved); `inert` is then\n // redundant-but-harmless.\n sx={captchaIsInteractive ? { display: 'none' } : undefined}\n >\n <SocialButtonsReversibleContainerWithDivider>\n {hasSocialOrWeb3Buttons && (\n <SignInSocialButtons\n enableWeb3Providers\n enableOAuthProviders\n enableAlternativePhoneCodeProviders={showAlternativePhoneCodeProviders}\n onAlternativePhoneCodeProviderClick={onAlternativePhoneCodeProviderClick}\n />\n )}\n {standardFormAttributes.length ? (\n <Form.Root\n onSubmit={handleFirstPartySubmit}\n gap={8}\n >\n <Col gap={6}>\n <Form.ControlRow elementId={identifierField.id}>\n <DynamicField\n actionLabel={nextIdentifier?.action}\n onActionClicked={switchToNextIdentifier}\n {...identifierFieldProps}\n autoFocus={shouldAutofocus}\n autoComplete={\n isWebAuthnAutofillSupported\n ? `${currentIdentifier.autoComplete} webauthn`\n : currentIdentifier.autoComplete\n }\n isLastAuthenticationStrategy={isIdentifierLastAuthenticationStrategy}\n />\n </Form.ControlRow>\n <InstantPasswordRow\n field={passwordBasedInstance ? instantPasswordField : undefined}\n onForgotPasswordClick={handleForgotPasswordClick}\n />\n </Col>\n <Col center>\n <Form.SubmitButton hasArrow />\n </Col>\n </Form.Root>\n ) : null}\n </SocialButtonsReversibleContainerWithDivider>\n </Col>\n <CaptchaElement\n gapless\n onInteractiveChange={setCaptchaIsInteractive}\n />\n {/* Kept outside descriptors.main so the spotlight's `inert` leaves this alternative action reachable. */}\n {userSettings.attributes.passkey?.enabled &&\n userSettings.passkeySettings.show_sign_in_button &&\n isWebSupported && (\n <Card.Action elementId={'usePasskey'}>\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__use_passkey')}\n onClick={() => authenticateWithPasskey({ flow: 'discoverable' })}\n />\n </Card.Action>\n )}\n </Card.Content>\n <Card.Footer>\n {userSettings.signUp.mode === SIGN_UP_MODES.PUBLIC && !isCombinedFlow && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink')}\n to={clerk.buildUrlWithAuth(signUpUrl)}\n />\n </Card.Action>\n )}\n {userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText__join_waitlist')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__join_waitlist')}\n to={clerk.buildUrlWithAuth(waitlistUrl)}\n />\n </Card.Action>\n )}\n </Card.Footer>\n </Card.Root>\n ) : (\n <SignInAlternativePhoneCodePhoneNumberCard\n handleSubmit={handleFirstPartySubmit}\n phoneNumberFormState={phoneIdentifierField}\n onUseAnotherMethod={onAlternativePhoneCodeUseAnotherMethod}\n phoneCodeProvider={alternativePhoneCodeProvider}\n />\n )}\n </Flow.Part>\n );\n}\n\nconst InstantPasswordRow = ({\n field,\n onForgotPasswordClick,\n}: {\n field?: FormControlState<'password'>;\n onForgotPasswordClick?: React.MouseEventHandler;\n}) => {\n const [autofilled, setAutofilled] = useState(false);\n const ref = useRef<HTMLInputElement>(null);\n const show = !!(autofilled || field?.value);\n\n // show password if it's autofilled by the browser\n useLayoutEffect(() => {\n const intervalId = setInterval(() => {\n if (ref?.current) {\n const autofilled =\n window.getComputedStyle(ref.current, ':autofill').animationName === 'onAutoFillStart' ||\n // https://github.com/facebook/react/issues/1159#issuecomment-1025423604\n !!ref.current?.matches('*:-webkit-autofill');\n if (autofilled) {\n setAutofilled(autofilled);\n clearInterval(intervalId);\n }\n }\n }, 500);\n\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n useEffect(() => {\n //if the field receives a value, we default to normal behaviour\n if (field?.value && field.value !== '') {\n setAutofilled(false);\n }\n }, [field?.value]);\n\n if (!field) {\n return null;\n }\n\n return (\n <Form.ControlRow\n elementId={field.id}\n aria-hidden={show ? undefined : true}\n sx={\n show\n ? undefined\n : {\n position: 'absolute',\n opacity: 0,\n height: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n marginTop: '-1rem',\n }\n }\n >\n <Form.PasswordInput\n {...field.props}\n actionLabel={show ? localizationKeys('formFieldAction__forgotPassword') : undefined}\n onActionClicked={show ? onForgotPasswordClick : undefined}\n tabIndex={show ? undefined : -1}\n ref={ref}\n />\n </Form.ControlRow>\n );\n};\n\nexport const SignInStart = withRedirectToSignInTask(\n withRedirectToAfterSignIn(withCardStateProvider(SignInStartInternal)),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,2BAA2B;CAC/B,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,uBAAuB,SAAS,YAAY;CAClD,MAAM,0BAA0B,iCAAiC,gBAAgB,eAAe;CAChG,MAAM,EAAE,iBAAiB,eAAe;CACxC,MAAM,EAAE,iBAAiB,eAAe;CAExC,MAAM,EAAE,2CAA2C,SAAS;CAE5D,gBAAgB;EACd,eAAe,qBAAqB;GAClC,MAAM,eAAe,OAAO,0CAA0C,4BAA2B,CAAE;GACnG,eAAe,YAAY;GAC3B,IAAI,CAAC,cACH;GAGF,MAAM,wBAAwB,EAAE,MAAM,WAAW,CAAC;EACpD;EAEA,IAAI,gBAAgB,kBAAkB,WAAW,SAAS,SACxD,mBAAmB;CAEvB,GAAG,CAAC,CAAC;CAEL,OAAO,EACL,6BAA6B,YAC/B;AACF;AAEA,SAAS,sBAAmC;CAC1C,MAAM,OAAO,aAAa;CAC1B,MAAM,QAAQ,SAAS;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,cAAc,eAAe,eAAe;CACpD,MAAM,SAAS,cAAc;CAC7B,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,MAAM,iBAAiB;CAC7B,MAAM,EAAE,gBAAgB,WAAW,aAAa,gBAAgB,wBAAwB,wBAAwB;CAChH,MAAM,eAAe,gBAAgB;CACrC,MAAM,0BAA0B,2BAA2B;CAC3D,MAAM,uBAAuB,cACrB,iBAAiB,aAAa,6BAA6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ClC,cAAc,KAAK;CAEvB,GAAG,CAAC,OAAO,KAAK,CAAC;CAEjB,IAAI,CAAC,OACH,OAAO;CAGT,OACE,oBAAC,KAAK,YAAN;EACE,WAAW,MAAM;EACjB,eAAa,OAAO,SAAY;EAChC,IACE,OACI,SACA;GACE,UAAU;GACV,SAAS;GACT,QAAQ;GACR,UAAU;GACV,eAAe;GACf,WAAW;EACb;YAGN,oBAAC,KAAK,eAAN;GACE,GAAI,MAAM;GACV,aAAa,OAAO,iBAAiB,iCAAiC,IAAI;GAC1E,iBAAiB,OAAO,wBAAwB;GAChD,UAAU,OAAO,SAAY;GACxB;EACN;CACc;AAErB;AAEA,MAAa,cAAc,yBACzB,0BAA0B,sBAAsB,mBAAmB,CAAC,CACtE"}
|
package/dist/index.js
CHANGED
package/dist/no-rhc/ClerkUI.js
CHANGED
|
@@ -22,8 +22,8 @@ import { isVersionAtLeast, parseVersion } from "@clerk/shared/versionCheck";
|
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
var ClerkUI = class ClerkUI {
|
|
25
|
-
static version = "1.42.5
|
|
26
|
-
version = "1.42.5
|
|
25
|
+
static version = "1.42.5";
|
|
26
|
+
version = "1.42.5";
|
|
27
27
|
#componentRenderer;
|
|
28
28
|
/**
|
|
29
29
|
* Creates a new `ClerkUI` instance and mounts the internal component renderer.
|
|
@@ -31,11 +31,19 @@ const SSOCallbackCard = (props) => {
|
|
|
31
31
|
reloadResource
|
|
32
32
|
}, navigate).catch((e) => {
|
|
33
33
|
if (cancelled) return;
|
|
34
|
-
|
|
34
|
+
let shownError;
|
|
35
|
+
const showError = (error) => {
|
|
36
|
+
shownError = error;
|
|
37
|
+
card.setError(error);
|
|
38
|
+
};
|
|
39
|
+
bounceTimeoutRef.current = setTimeout(() => {
|
|
40
|
+
if (window.Clerk) window.Clerk.__internal_last_error = shownError;
|
|
41
|
+
navigate("../");
|
|
42
|
+
}, 4e3);
|
|
35
43
|
try {
|
|
36
|
-
handleError(e, [],
|
|
44
|
+
handleError(e, [], showError);
|
|
37
45
|
} catch {
|
|
38
|
-
|
|
46
|
+
showError("Unable to complete action at this time. If the problem persists please contact support.");
|
|
39
47
|
}
|
|
40
48
|
});
|
|
41
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSOCallback.js","names":[],"sources":["../../../src/common/SSOCallback.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { Flow } from '../customizables';\nimport { CaptchaElement } from '../elements/CaptchaElement';\nimport { Card } from '../elements/Card';\nimport { useCardState, withCardStateProvider } from '../elements/contexts';\nimport { LoadingCardContainer } from '../elements/LoadingCard';\nimport { useRouter } from '../router';\nimport { handleError } from '../utils/errorHandler';\n\nexport const SSOCallback = withCardStateProvider<HandleOAuthCallbackParams | HandleSamlCallbackParams>(props => {\n return (\n <Flow.Part part='ssoCallback'>\n <SSOCallbackCard {...props} />\n </Flow.Part>\n );\n});\n\nexport const SSOCallbackCard = (props: HandleOAuthCallbackParams | HandleSamlCallbackParams) => {\n const { handleRedirectCallback, __internal_setActiveInProgress } = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n\n const bounceTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n React.useEffect(() => {\n let cancelled = false;\n\n if (__internal_setActiveInProgress !== true) {\n const intent = new URLSearchParams(window.location.search).get('intent');\n const reloadResource = intent === 'signIn' || intent === 'signUp' ? intent : undefined;\n handleRedirectCallback({ ...props, reloadResource }, navigate).catch(e => {\n if (cancelled) {\n return;\n }\n\n bounceTimeoutRef.current = setTimeout(() => void navigate('../'), 4000);\n try {\n handleError(e, [],
|
|
1
|
+
{"version":3,"file":"SSOCallback.js","names":[],"sources":["../../../src/common/SSOCallback.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { Flow } from '../customizables';\nimport { CaptchaElement } from '../elements/CaptchaElement';\nimport { Card } from '../elements/Card';\nimport { useCardState, withCardStateProvider } from '../elements/contexts';\nimport { LoadingCardContainer } from '../elements/LoadingCard';\nimport { useRouter } from '../router';\nimport { handleError } from '../utils/errorHandler';\n\nexport const SSOCallback = withCardStateProvider<HandleOAuthCallbackParams | HandleSamlCallbackParams>(props => {\n return (\n <Flow.Part part='ssoCallback'>\n <SSOCallbackCard {...props} />\n </Flow.Part>\n );\n});\n\nexport const SSOCallbackCard = (props: HandleOAuthCallbackParams | HandleSamlCallbackParams) => {\n const { handleRedirectCallback, __internal_setActiveInProgress } = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n\n const bounceTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n React.useEffect(() => {\n let cancelled = false;\n\n if (__internal_setActiveInProgress !== true) {\n const intent = new URLSearchParams(window.location.search).get('intent');\n const reloadResource = intent === 'signIn' || intent === 'signUp' ? intent : undefined;\n handleRedirectCallback({ ...props, reloadResource }, navigate).catch(e => {\n if (cancelled) {\n return;\n }\n\n let shownError: Parameters<typeof card.setError>[0];\n const showError = (error: typeof shownError) => {\n shownError = error;\n card.setError(error);\n };\n\n bounceTimeoutRef.current = setTimeout(() => {\n if (window.Clerk) {\n window.Clerk.__internal_last_error = shownError;\n }\n void navigate('../');\n }, 4000);\n try {\n handleError(e, [], showError);\n } catch {\n showError('Unable to complete action at this time. If the problem persists please contact support.');\n }\n });\n }\n\n return () => {\n cancelled = true;\n clearTimeout(bounceTimeoutRef.current);\n };\n }, [handleError, handleRedirectCallback]);\n\n return (\n <Flow.Part part='ssoCallback'>\n <Card.Root>\n <Card.Content>\n <Card.Alert>{card.error}</Card.Alert>\n <LoadingCardContainer />\n <CaptchaElement />\n </Card.Content>\n <Card.Footer />\n </Card.Root>\n </Flow.Part>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA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+347,7 @@ function SignInStartInternal() {
|
|
|
347
347
|
};
|
|
348
348
|
const error = signIn?.firstFactorVerification?.error;
|
|
349
349
|
if (error) {
|
|
350
|
-
switch (error.code) {
|
|
350
|
+
if (!card.error) switch (error.code) {
|
|
351
351
|
case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:
|
|
352
352
|
case ERROR_CODES.OAUTH_ACCESS_DENIED:
|
|
353
353
|
case ERROR_CODES.NOT_ALLOWED_ACCESS:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInStart.js","names":[],"sources":["../../../../src/components/SignIn/SignInStart.tsx"],"sourcesContent":["import { getAlternativePhoneCodeProviderData } from '@clerk/shared/alternativePhoneCode';\nimport { inertProps } from '@clerk/shared/inert';\nimport { ERROR_CODES, SIGN_UP_MODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { clerkInvalidFAPIResponse } from '@clerk/shared/internal/clerk-js/errors';\nimport { getClerkQueryParam, removeClerkQueryParam } from '@clerk/shared/internal/clerk-js/queryParams';\nimport { useClerk } from '@clerk/shared/react';\nimport type {\n ClerkAPIError,\n PhoneCodeChannel,\n PhoneCodeChannelData,\n SignInCreateParams,\n SignInResource,\n} from '@clerk/shared/types';\nimport { isWebAuthnAutofillSupported } from '@clerk/shared/webauthn';\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { Card } from '@/ui/elements/Card';\nimport { useCardState, withCardStateProvider } from '@/ui/elements/contexts';\nimport { Form } from '@/ui/elements/Form';\nimport { Header } from '@/ui/elements/Header';\nimport { LoadingCard } from '@/ui/elements/LoadingCard';\nimport { SocialButtonsReversibleContainerWithDivider } from '@/ui/elements/ReversibleContainer';\nimport { actionBlockedDetailsFrom } from '@/ui/utils/actionBlocked';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { isMobileDevice } from '@/ui/utils/isMobileDevice';\nimport type { FormControlState } from '@/ui/utils/useFormControl';\nimport { buildRequest, useFormControl } from '@/ui/utils/useFormControl';\n\nimport type { SignInStartIdentifier } from '../../common';\nimport {\n ActionBlockedCard,\n getIdentifierControlDisplayValues,\n groupIdentifiers,\n withRedirectToAfterSignIn,\n withRedirectToSignInTask,\n} from '../../common';\nimport { useCoreSignIn, useEnvironment, useSignInContext } from '../../contexts';\nimport { Col, descriptors, Flow, localizationKeys } from '../../customizables';\nimport { CaptchaElement } from '../../elements/CaptchaElement';\nimport { useIsWebAuthnSupported, useLoadingStatus } from '../../hooks';\nimport { useSupportEmail } from '../../hooks/useSupportEmail';\nimport { useTotalEnabledAuthMethods } from '../../hooks/useTotalEnabledAuthMethods';\nimport { useRouter } from '../../router';\nimport {\n hasOnlyEnterpriseSSOFirstFactors,\n shouldHandOffToEnterpriseConnection,\n shouldHandOffUnidentifiedToEnterpriseConnection,\n} from './enterpriseSSOFactors';\nimport { handleCombinedFlowTransfer } from './handleCombinedFlowTransfer';\nimport { isProtectCheckRequiredError, navigateOnSignInProtectGate } from './handleProtectCheck';\nimport { SIGN_IN_RESET_PASSWORD_INTENT_PARAM, useHandleAuthenticateWithPasskey } from './shared';\nimport { SignInAlternativePhoneCodePhoneNumberCard } from './SignInAlternativePhoneCodePhoneNumberCard';\nimport { SignInSocialButtons } from './SignInSocialButtons';\nimport {\n getPreferredAlternativePhoneChannel,\n getPreferredAlternativePhoneChannelForCombinedFlow,\n getSignUpAttributeFromIdentifier,\n} from './utils';\n\nconst useAutoFillPasskey = () => {\n const [isSupported, setIsSupported] = useState(false);\n const { navigate } = useRouter();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const { userSettings } = useEnvironment();\n const { passkeySettings, attributes } = userSettings;\n // @ts-expect-error - This is not a public API\n const { __internal_isWebAuthnAutofillSupported } = useClerk();\n\n useEffect(() => {\n async function runAutofillPasskey() {\n const _isSupported = await (__internal_isWebAuthnAutofillSupported ?? isWebAuthnAutofillSupported)();\n setIsSupported(_isSupported);\n if (!_isSupported) {\n return;\n }\n\n await authenticateWithPasskey({ flow: 'autofill' });\n }\n\n if (passkeySettings.allow_autofill && attributes.passkey?.enabled) {\n runAutofillPasskey();\n }\n }, []);\n\n return {\n isWebAuthnAutofillSupported: isSupported,\n };\n};\n\nfunction SignInStartInternal(): JSX.Element {\n const card = useCardState();\n const clerk = useClerk();\n const status = useLoadingStatus();\n const { userSettings, authConfig } = useEnvironment();\n const signIn = useCoreSignIn();\n const { navigate } = useRouter();\n const ctx = useSignInContext();\n const { afterSignInUrl, signUpUrl, waitlistUrl, isCombinedFlow, signUpIfMissingEnabled, navigateOnSetActive } = ctx;\n const supportEmail = useSupportEmail();\n const totalEnabledAuthMethods = useTotalEnabledAuthMethods();\n const identifierAttributes = useMemo<SignInStartIdentifier[]>(\n () => groupIdentifiers(userSettings.enabledFirstFactorIdentifiers),\n [userSettings.enabledFirstFactorIdentifiers],\n );\n const alternativePhoneCodeChannels = userSettings.alternativePhoneCodeChannels;\n\n /**\n * Passkeys\n */\n const { isWebAuthnAutofillSupported } = useAutoFillPasskey();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const isWebSupported = useIsWebAuthnSupported();\n\n const onlyPhoneNumberInitialValueExists =\n !!ctx.initialValues?.phoneNumber && !(ctx.initialValues.emailAddress || ctx.initialValues.username);\n const shouldStartWithPhoneNumberIdentifier =\n onlyPhoneNumberInitialValueExists && identifierAttributes.includes('phone_number');\n const [identifierAttribute, setIdentifierAttribute] = useState<SignInStartIdentifier>(\n shouldStartWithPhoneNumberIdentifier ? 'phone_number' : identifierAttributes[0] || '',\n );\n const [hasSwitchedByAutofill, setHasSwitchedByAutofill] = useState(false);\n\n const organizationTicket = getClerkQueryParam('__clerk_ticket') || '';\n const clerkStatus = getClerkQueryParam('__clerk_status') || '';\n\n const standardFormAttributes = userSettings.enabledFirstFactorIdentifiers;\n const web3FirstFactors = userSettings.web3FirstFactors;\n const authenticatableSocialStrategies = userSettings.authenticatableSocialStrategies;\n const passwordBasedInstance = userSettings.instanceIsPasswordBased;\n const { currentIdentifier, nextIdentifier } = getIdentifierControlDisplayValues(\n identifierAttributes,\n identifierAttribute,\n );\n const instantPasswordField = useFormControl('password', '', {\n type: 'password',\n label: localizationKeys('formFieldLabel__password'),\n placeholder: localizationKeys('formFieldInputPlaceholder__password') as any,\n });\n\n const [alternativePhoneCodeProvider, setAlternativePhoneCodeProvider] = useState<PhoneCodeChannelData | null>(null);\n\n const showAlternativePhoneCodeProviders = userSettings.alternativePhoneCodeChannels.length > 0;\n\n const onAlternativePhoneCodeUseAnotherMethod = () => {\n setAlternativePhoneCodeProvider(null);\n };\n const onAlternativePhoneCodeProviderClick = (phoneCodeChannel: PhoneCodeChannel) => {\n const provider: PhoneCodeChannelData | null = getAlternativePhoneCodeProviderData(phoneCodeChannel) || null;\n setAlternativePhoneCodeProvider(provider);\n };\n\n const ctxInitialValues = ctx.initialValues || {};\n const initialValues: Record<SignInStartIdentifier, string | undefined> = useMemo(\n () => ({\n email_address: ctxInitialValues.emailAddress,\n email_address_username: ctxInitialValues.emailAddress || ctxInitialValues.username,\n username: ctxInitialValues.username,\n phone_number: ctxInitialValues.phoneNumber,\n }),\n [ctx.initialValues],\n );\n\n const hasSocialOrWeb3Buttons =\n !!authenticatableSocialStrategies.length || !!web3FirstFactors.length || !!alternativePhoneCodeChannels.length;\n const [shouldAutofocus, setShouldAutofocus] = useState(!isMobileDevice() && !hasSocialOrWeb3Buttons);\n // When the captcha escalates to an interactive challenge, spotlight it by collapsing/inerting the\n // rest of the card (see the descriptors.main column below).\n const [captchaIsInteractive, setCaptchaIsInteractive] = useState(false);\n const textIdentifierField = useFormControl('identifier', initialValues[identifierAttribute] || '', {\n ...currentIdentifier,\n isRequired: true,\n transformer: value => value.trim(),\n });\n\n const phoneIdentifierField = useFormControl('identifier', initialValues['phone_number'] || '', {\n ...currentIdentifier,\n isRequired: true,\n });\n\n const identifierField = identifierAttribute === 'phone_number' ? phoneIdentifierField : textIdentifierField;\n\n const switchToNextIdentifier = () => {\n setIdentifierAttribute(\n i => identifierAttributes[(identifierAttributes.indexOf(i) + 1) % identifierAttributes.length],\n );\n setShouldAutofocus(true);\n setHasSwitchedByAutofill(false);\n };\n\n const handlePhoneNumberPaste = (value: string) => {\n textIdentifierField.setValue(initialValues[identifierAttribute] || '');\n phoneIdentifierField.setValue(value);\n setIdentifierAttribute('phone_number');\n setShouldAutofocus(true);\n };\n\n // switch to the phone input (if available) if a \"+\" is entered\n // (either by the browser or the user)\n // this does not work in chrome as it does not fire the change event and the value is\n // not available via js\n useLayoutEffect(() => {\n if (\n identifierField.value.startsWith('+') &&\n identifierAttributes.includes('phone_number') &&\n identifierAttribute !== 'phone_number' &&\n !hasSwitchedByAutofill\n ) {\n handlePhoneNumberPaste(identifierField.value);\n // do not switch automatically on subsequent autofills\n // by the browser to avoid a switch loop\n setHasSwitchedByAutofill(true);\n }\n }, [identifierField.value, identifierAttributes]);\n\n const buildSignInParams = (fields: Array<FormControlState<string>>): SignInCreateParams => {\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n\n /**\n * FAPI will return an error when password is submitted but the user's email matches requires enterprise sso authentication.\n * We need to strip password from the create request, and reconstruct it later.\n */\n if (!hasPassword || userSettings.enterpriseSSO.enabled) {\n fields = fields.filter(f => f.name !== 'password');\n }\n return {\n ...buildRequest(fields),\n ...(hasPassword && !userSettings.enterpriseSSO.enabled && { strategy: 'password' }),\n } as SignInCreateParams;\n };\n\n const safePasswordSignInForEnterpriseSSOInstance = (\n signInCreatePromise: Promise<SignInResource>,\n fields: Array<FormControlState<string>>,\n ) => {\n return signInCreatePromise.then(signInResource => {\n if (!userSettings.enterpriseSSO.enabled) {\n return signInResource;\n }\n /**\n * For instances with Enterprise SSO enabled, perform sign in with password only when it is allowed for the identified user.\n */\n const passwordField = fields.find(f => f.name === 'password')?.value;\n if (!passwordField || signInResource.supportedFirstFactors?.some(ff => ff.strategy === 'enterprise_sso')) {\n return signInResource;\n }\n return signInResource.attemptFirstFactor({ strategy: 'password', password: passwordField });\n });\n };\n\n const signInWithFields = async (\n fields: Array<FormControlState<string>>,\n options?: { resetPasswordIntent?: boolean },\n ) => {\n // If the user has already selected an alternative phone code provider, we use that.\n const preferredAlternativePhoneChannel =\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannel(fields, authConfig.preferredChannels, 'identifier');\n if (preferredAlternativePhoneChannel) {\n // We need to send the alternative phone code provider channel in the sign in request\n // together with the phone_code strategy, in order for FAPI to create a Verification upon this first request.\n const noop = () => {};\n fields.push({\n id: 'strategy',\n value: 'phone_code',\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n fields.push({\n id: 'channel',\n value: preferredAlternativePhoneChannel,\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n }\n try {\n // On top of the context-level preconditions, sign-up-if-missing only\n // supports identifiers that can be verified out-of-band.\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n const signUpAttribute = getSignUpAttributeFromIdentifier(identifierField);\n const shouldSignUpIfMissing = signUpIfMissingEnabled && signUpAttribute !== 'username' && !hasPassword;\n\n const res = await safePasswordSignInForEnterpriseSSOInstance(\n signIn.create({\n ...buildSignInParams(fields),\n ...(shouldSignUpIfMissing && { signUpIfMissing: true }),\n }),\n fields,\n );\n\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n\n switch (res.status) {\n case 'needs_identifier':\n // Check if we need to initiate an enterprise sso flow\n if (shouldHandOffUnidentifiedToEnterpriseConnection(res)) {\n await authenticateWithEnterpriseSSO();\n }\n break;\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n if (options?.resetPasswordIntent) {\n return navigate('factor-one', {\n searchParams: new URLSearchParams({ [SIGN_IN_RESET_PASSWORD_INTENT_PARAM]: 'true' }),\n });\n }\n return navigate('factor-one');\n }\n\n // Awaited so a failed hand-off reaches the catch below instead of escaping this try.\n return await authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n } catch (e: any) {\n return attemptToRecoverFromSignInError(e);\n }\n };\n\n const authenticateWithEnterpriseSSO = async () => {\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n\n try {\n await signIn.authenticateWithRedirect({\n strategy: 'enterprise_sso',\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n continueSignIn: true,\n });\n } catch (err) {\n // Preparing the hand-off can itself raise a challenge. No redirect was issued and the sign-in\n // is sitting on the gate instead. Handled here because the callers' recovery path drops\n // errors that didn't come from the API.\n if (isProtectCheckRequiredError(err) && navigateOnSignInProtectGate(signIn, navigate, 'protect-check')) {\n return;\n }\n throw err;\n }\n };\n\n const attemptToRecoverFromSignInError = async (e: any) => {\n if (!e.errors) {\n return;\n }\n const instantPasswordError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVALID_STRATEGY_FOR_USER ||\n e.code === ERROR_CODES.FORM_PASSWORD_INCORRECT ||\n e.code === ERROR_CODES.FORM_PASSWORD_PWNED,\n );\n\n const sessionAlreadyExistsError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n const alreadySignedInError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === 'identifier_already_signed_in',\n );\n const accountDoesNotExistError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVITATION_ACCOUNT_NOT_EXISTS || e.code === ERROR_CODES.FORM_IDENTIFIER_NOT_FOUND,\n );\n\n if (instantPasswordError) {\n await signInWithFields([identifierField]);\n } else if (sessionAlreadyExistsError) {\n await clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (alreadySignedInError) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const sid = alreadySignedInError.meta!.sessionId!;\n await clerk.setActive({\n session: sid,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (isCombinedFlow && accountDoesNotExistError) {\n const attribute = getSignUpAttributeFromIdentifier(identifierField);\n\n if (userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST) {\n const waitlistUrl = clerk.buildWaitlistUrl(\n attribute === 'emailAddress'\n ? {\n initialValues: {\n [attribute]: identifierField.value,\n },\n }\n : {},\n );\n return navigate(waitlistUrl);\n }\n\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n\n return handleCombinedFlowTransfer({\n afterSignUpUrl: ctx.afterSignUpUrl || '/',\n clerk,\n handleError: e => handleError(e, [identifierField, instantPasswordField], card.setError),\n identifierAttribute: attribute,\n identifierValue: identifierField.value,\n navigate,\n organizationTicket,\n signUpMode: userSettings.signUp.mode,\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n navigateOnSetActive,\n passwordEnabled: userSettings.attributes.password?.required ?? false,\n alternativePhoneCodeChannel:\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannelForCombinedFlow(\n authConfig.preferredChannels,\n attribute,\n identifierField.value,\n ),\n unsafeMetadata: ctx.unsafeMetadata,\n });\n } else {\n handleError(e, [identifierField, instantPasswordField], card.setError);\n }\n };\n\n useEffect(() => {\n if (!organizationTicket) {\n return;\n }\n\n if (clerkStatus === 'sign_up') {\n const paramsToForward = new URLSearchParams();\n if (organizationTicket) {\n paramsToForward.set('__clerk_ticket', organizationTicket);\n }\n // We explicitly navigate to 'create' in the combined flow to trigger a client-side navigation. Navigating to\n // signUpUrl triggers a full page reload when used with the hash router.\n void navigate(isCombinedFlow ? `create` : signUpUrl, { searchParams: paramsToForward });\n return;\n }\n\n status.setLoading();\n card.setLoading();\n signIn\n .create({\n strategy: 'ticket',\n ticket: organizationTicket,\n })\n .then(res => {\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n switch (res.status) {\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n return navigate('factor-one');\n }\n\n return authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n removeClerkQueryParam('__clerk_ticket');\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n })\n .catch(err => {\n return attemptToRecoverFromSignInError(err);\n })\n .finally(() => {\n // Keep the card in loading state during SSO redirect to prevent UI flicker\n // This is necessary because there's a brief delay between initiating the SSO flow\n // and the actual redirect to the external Identity Provider\n const isRedirectingToSSOProvider = !!hasOnlyEnterpriseSSOFirstFactors(signIn);\n if (isRedirectingToSSOProvider) {\n return;\n }\n\n status.setIdle();\n card.setIdle();\n });\n }, []);\n\n useEffect(() => {\n async function handleOauthError() {\n const defaultErrorHandler = () => {\n // Error from server may be too much information for the end user, so set a generic error\n card.setError('Unable to complete action at this time. If the problem persists please contact support.');\n };\n\n const error = signIn?.firstFactorVerification?.error;\n if (error) {\n switch (error.code) {\n case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:\n case ERROR_CODES.OAUTH_ACCESS_DENIED:\n case ERROR_CODES.NOT_ALLOWED_ACCESS:\n case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:\n case ERROR_CODES.USER_LOCKED:\n case ERROR_CODES.EXTERNAL_ACCOUNT_NOT_FOUND:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED_WAITLIST:\n case ERROR_CODES.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:\n case ERROR_CODES.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:\n case ERROR_CODES.CAPTCHA_INVALID:\n case ERROR_CODES.FRAUD_DEVICE_BLOCKED:\n case ERROR_CODES.FRAUD_ACTION_BLOCKED:\n case ERROR_CODES.SIGNUP_RATE_LIMIT_EXCEEDED:\n case ERROR_CODES.USER_BANNED:\n case ERROR_CODES.USER_DEACTIVATED:\n card.setError(error);\n break;\n default:\n defaultErrorHandler();\n }\n\n // TODO: This is a workaround in order to reset the sign in attempt\n // so that the oauth error does not persist on full page reloads.\n void (await signIn.create({}));\n }\n }\n\n void handleOauthError();\n }, []);\n\n const handleFirstPartySubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n return signInWithFields([identifierField, instantPasswordField]);\n };\n\n const handleForgotPasswordClick: React.MouseEventHandler = e => {\n e.preventDefault();\n // Surface the same native required-field validation as the Continue button\n // when the identifier is missing\n const form = e.currentTarget.closest('form');\n if (form && !form.reportValidity()) {\n return;\n }\n void signInWithFields([identifierField], { resetPasswordIntent: true });\n };\n\n const DynamicField = useMemo(() => {\n const components = {\n tel: Form.PhoneInput,\n password: Form.PasswordInput,\n text: Form.PlainInput,\n email: Form.PlainInput,\n };\n\n return components[identifierField.type as keyof typeof components];\n }, [identifierField.type]);\n\n if (status.isLoading || clerkStatus === 'sign_up') {\n // clerkStatus being sign_up will trigger a navigation to the sign up flow, so show a loading card instead of\n // rendering the sign in flow.\n return <LoadingCard />;\n }\n\n // @ts-expect-error `action` is not typed\n const { action, validLastAuthenticationStrategies, ...identifierFieldProps } = identifierField.props;\n\n const lastAuthenticationStrategy = clerk.client?.lastAuthenticationStrategy;\n const isIdentifierLastAuthenticationStrategy =\n lastAuthenticationStrategy && totalEnabledAuthMethods > 1\n ? validLastAuthenticationStrategies?.has(lastAuthenticationStrategy)\n : false;\n\n const blockedDetails = actionBlockedDetailsFrom(card.rawError);\n if (blockedDetails) {\n return <ActionBlockedCard details={blockedDetails} />;\n }\n\n return (\n <Flow.Part part='start'>\n {!alternativePhoneCodeProvider ? (\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.titleCombined')\n : localizationKeys('signIn.start.title')\n }\n />\n <Header.Subtitle\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.subtitleCombined')\n : localizationKeys('signIn.start.subtitle')\n }\n sx={{\n '&:empty': {\n display: 'none',\n },\n }}\n />\n </Header.Root>\n <Card.Alert>{card.error}</Card.Alert>\n {/*TODO: extract main in its own component */}\n <Col\n elementDescriptor={descriptors.main}\n gap={6}\n {...inertProps(captchaIsInteractive)}\n // `display:none` (not `visibility:hidden`) so the collapsed column leaves flex flow and\n // contributes no `gap` gutter to `Card.Content` — otherwise it injects empty space above\n // the spotlighted captcha. Subtree stays mounted (form state preserved); `inert` is then\n // redundant-but-harmless.\n sx={captchaIsInteractive ? { display: 'none' } : undefined}\n >\n <SocialButtonsReversibleContainerWithDivider>\n {hasSocialOrWeb3Buttons && (\n <SignInSocialButtons\n enableWeb3Providers\n enableOAuthProviders\n enableAlternativePhoneCodeProviders={showAlternativePhoneCodeProviders}\n onAlternativePhoneCodeProviderClick={onAlternativePhoneCodeProviderClick}\n />\n )}\n {standardFormAttributes.length ? (\n <Form.Root\n onSubmit={handleFirstPartySubmit}\n gap={8}\n >\n <Col gap={6}>\n <Form.ControlRow elementId={identifierField.id}>\n <DynamicField\n actionLabel={nextIdentifier?.action}\n onActionClicked={switchToNextIdentifier}\n {...identifierFieldProps}\n autoFocus={shouldAutofocus}\n autoComplete={\n isWebAuthnAutofillSupported\n ? `${currentIdentifier.autoComplete} webauthn`\n : currentIdentifier.autoComplete\n }\n isLastAuthenticationStrategy={isIdentifierLastAuthenticationStrategy}\n />\n </Form.ControlRow>\n <InstantPasswordRow\n field={passwordBasedInstance ? instantPasswordField : undefined}\n onForgotPasswordClick={handleForgotPasswordClick}\n />\n </Col>\n <Col center>\n <Form.SubmitButton hasArrow />\n </Col>\n </Form.Root>\n ) : null}\n </SocialButtonsReversibleContainerWithDivider>\n </Col>\n <CaptchaElement\n gapless\n onInteractiveChange={setCaptchaIsInteractive}\n />\n {/* Kept outside descriptors.main so the spotlight's `inert` leaves this alternative action reachable. */}\n {userSettings.attributes.passkey?.enabled &&\n userSettings.passkeySettings.show_sign_in_button &&\n isWebSupported && (\n <Card.Action elementId={'usePasskey'}>\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__use_passkey')}\n onClick={() => authenticateWithPasskey({ flow: 'discoverable' })}\n />\n </Card.Action>\n )}\n </Card.Content>\n <Card.Footer>\n {userSettings.signUp.mode === SIGN_UP_MODES.PUBLIC && !isCombinedFlow && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink')}\n to={clerk.buildUrlWithAuth(signUpUrl)}\n />\n </Card.Action>\n )}\n {userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText__join_waitlist')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__join_waitlist')}\n to={clerk.buildUrlWithAuth(waitlistUrl)}\n />\n </Card.Action>\n )}\n </Card.Footer>\n </Card.Root>\n ) : (\n <SignInAlternativePhoneCodePhoneNumberCard\n handleSubmit={handleFirstPartySubmit}\n phoneNumberFormState={phoneIdentifierField}\n onUseAnotherMethod={onAlternativePhoneCodeUseAnotherMethod}\n phoneCodeProvider={alternativePhoneCodeProvider}\n />\n )}\n </Flow.Part>\n );\n}\n\nconst InstantPasswordRow = ({\n field,\n onForgotPasswordClick,\n}: {\n field?: FormControlState<'password'>;\n onForgotPasswordClick?: React.MouseEventHandler;\n}) => {\n const [autofilled, setAutofilled] = useState(false);\n const ref = useRef<HTMLInputElement>(null);\n const show = !!(autofilled || field?.value);\n\n // show password if it's autofilled by the browser\n useLayoutEffect(() => {\n const intervalId = setInterval(() => {\n if (ref?.current) {\n const autofilled =\n window.getComputedStyle(ref.current, ':autofill').animationName === 'onAutoFillStart' ||\n // https://github.com/facebook/react/issues/1159#issuecomment-1025423604\n !!ref.current?.matches('*:-webkit-autofill');\n if (autofilled) {\n setAutofilled(autofilled);\n clearInterval(intervalId);\n }\n }\n }, 500);\n\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n useEffect(() => {\n //if the field receives a value, we default to normal behaviour\n if (field?.value && field.value !== '') {\n setAutofilled(false);\n }\n }, [field?.value]);\n\n if (!field) {\n return null;\n }\n\n return (\n <Form.ControlRow\n elementId={field.id}\n aria-hidden={show ? undefined : true}\n sx={\n show\n ? undefined\n : {\n position: 'absolute',\n opacity: 0,\n height: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n marginTop: '-1rem',\n }\n }\n >\n <Form.PasswordInput\n {...field.props}\n actionLabel={show ? localizationKeys('formFieldAction__forgotPassword') : undefined}\n onActionClicked={show ? onForgotPasswordClick : undefined}\n tabIndex={show ? undefined : -1}\n ref={ref}\n />\n </Form.Control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EAChC,IACE,OACI,SACA;GACE,UAAU;GACV,SAAS;GACT,QAAQ;GACR,UAAU;GACV,eAAe;GACf,WAAW;EACb;YAGN,oBAAC,KAAK,eAAN;GACE,GAAI,MAAM;GACV,aAAa,OAAO,iBAAiB,iCAAiC,IAAI;GAC1E,iBAAiB,OAAO,wBAAwB;GAChD,UAAU,OAAO,SAAY;GACxB;EACN;CACc;AAErB;AAEA,MAAa,cAAc,yBACzB,0BAA0B,sBAAsB,mBAAmB,CAAC,CACtE"}
|
|
1
|
+
{"version":3,"file":"SignInStart.js","names":[],"sources":["../../../../src/components/SignIn/SignInStart.tsx"],"sourcesContent":["import { getAlternativePhoneCodeProviderData } from '@clerk/shared/alternativePhoneCode';\nimport { inertProps } from '@clerk/shared/inert';\nimport { ERROR_CODES, SIGN_UP_MODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { clerkInvalidFAPIResponse } from '@clerk/shared/internal/clerk-js/errors';\nimport { getClerkQueryParam, removeClerkQueryParam } from '@clerk/shared/internal/clerk-js/queryParams';\nimport { useClerk } from '@clerk/shared/react';\nimport type {\n ClerkAPIError,\n PhoneCodeChannel,\n PhoneCodeChannelData,\n SignInCreateParams,\n SignInResource,\n} from '@clerk/shared/types';\nimport { isWebAuthnAutofillSupported } from '@clerk/shared/webauthn';\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { Card } from '@/ui/elements/Card';\nimport { useCardState, withCardStateProvider } from '@/ui/elements/contexts';\nimport { Form } from '@/ui/elements/Form';\nimport { Header } from '@/ui/elements/Header';\nimport { LoadingCard } from '@/ui/elements/LoadingCard';\nimport { SocialButtonsReversibleContainerWithDivider } from '@/ui/elements/ReversibleContainer';\nimport { actionBlockedDetailsFrom } from '@/ui/utils/actionBlocked';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { isMobileDevice } from '@/ui/utils/isMobileDevice';\nimport type { FormControlState } from '@/ui/utils/useFormControl';\nimport { buildRequest, useFormControl } from '@/ui/utils/useFormControl';\n\nimport type { SignInStartIdentifier } from '../../common';\nimport {\n ActionBlockedCard,\n getIdentifierControlDisplayValues,\n groupIdentifiers,\n withRedirectToAfterSignIn,\n withRedirectToSignInTask,\n} from '../../common';\nimport { useCoreSignIn, useEnvironment, useSignInContext } from '../../contexts';\nimport { Col, descriptors, Flow, localizationKeys } from '../../customizables';\nimport { CaptchaElement } from '../../elements/CaptchaElement';\nimport { useIsWebAuthnSupported, useLoadingStatus } from '../../hooks';\nimport { useSupportEmail } from '../../hooks/useSupportEmail';\nimport { useTotalEnabledAuthMethods } from '../../hooks/useTotalEnabledAuthMethods';\nimport { useRouter } from '../../router';\nimport {\n hasOnlyEnterpriseSSOFirstFactors,\n shouldHandOffToEnterpriseConnection,\n shouldHandOffUnidentifiedToEnterpriseConnection,\n} from './enterpriseSSOFactors';\nimport { handleCombinedFlowTransfer } from './handleCombinedFlowTransfer';\nimport { isProtectCheckRequiredError, navigateOnSignInProtectGate } from './handleProtectCheck';\nimport { SIGN_IN_RESET_PASSWORD_INTENT_PARAM, useHandleAuthenticateWithPasskey } from './shared';\nimport { SignInAlternativePhoneCodePhoneNumberCard } from './SignInAlternativePhoneCodePhoneNumberCard';\nimport { SignInSocialButtons } from './SignInSocialButtons';\nimport {\n getPreferredAlternativePhoneChannel,\n getPreferredAlternativePhoneChannelForCombinedFlow,\n getSignUpAttributeFromIdentifier,\n} from './utils';\n\nconst useAutoFillPasskey = () => {\n const [isSupported, setIsSupported] = useState(false);\n const { navigate } = useRouter();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const { userSettings } = useEnvironment();\n const { passkeySettings, attributes } = userSettings;\n // @ts-expect-error - This is not a public API\n const { __internal_isWebAuthnAutofillSupported } = useClerk();\n\n useEffect(() => {\n async function runAutofillPasskey() {\n const _isSupported = await (__internal_isWebAuthnAutofillSupported ?? isWebAuthnAutofillSupported)();\n setIsSupported(_isSupported);\n if (!_isSupported) {\n return;\n }\n\n await authenticateWithPasskey({ flow: 'autofill' });\n }\n\n if (passkeySettings.allow_autofill && attributes.passkey?.enabled) {\n runAutofillPasskey();\n }\n }, []);\n\n return {\n isWebAuthnAutofillSupported: isSupported,\n };\n};\n\nfunction SignInStartInternal(): JSX.Element {\n const card = useCardState();\n const clerk = useClerk();\n const status = useLoadingStatus();\n const { userSettings, authConfig } = useEnvironment();\n const signIn = useCoreSignIn();\n const { navigate } = useRouter();\n const ctx = useSignInContext();\n const { afterSignInUrl, signUpUrl, waitlistUrl, isCombinedFlow, signUpIfMissingEnabled, navigateOnSetActive } = ctx;\n const supportEmail = useSupportEmail();\n const totalEnabledAuthMethods = useTotalEnabledAuthMethods();\n const identifierAttributes = useMemo<SignInStartIdentifier[]>(\n () => groupIdentifiers(userSettings.enabledFirstFactorIdentifiers),\n [userSettings.enabledFirstFactorIdentifiers],\n );\n const alternativePhoneCodeChannels = userSettings.alternativePhoneCodeChannels;\n\n /**\n * Passkeys\n */\n const { isWebAuthnAutofillSupported } = useAutoFillPasskey();\n const onSecondFactor = () => navigate('factor-two');\n const authenticateWithPasskey = useHandleAuthenticateWithPasskey(onSecondFactor, 'protect-check');\n const isWebSupported = useIsWebAuthnSupported();\n\n const onlyPhoneNumberInitialValueExists =\n !!ctx.initialValues?.phoneNumber && !(ctx.initialValues.emailAddress || ctx.initialValues.username);\n const shouldStartWithPhoneNumberIdentifier =\n onlyPhoneNumberInitialValueExists && identifierAttributes.includes('phone_number');\n const [identifierAttribute, setIdentifierAttribute] = useState<SignInStartIdentifier>(\n shouldStartWithPhoneNumberIdentifier ? 'phone_number' : identifierAttributes[0] || '',\n );\n const [hasSwitchedByAutofill, setHasSwitchedByAutofill] = useState(false);\n\n const organizationTicket = getClerkQueryParam('__clerk_ticket') || '';\n const clerkStatus = getClerkQueryParam('__clerk_status') || '';\n\n const standardFormAttributes = userSettings.enabledFirstFactorIdentifiers;\n const web3FirstFactors = userSettings.web3FirstFactors;\n const authenticatableSocialStrategies = userSettings.authenticatableSocialStrategies;\n const passwordBasedInstance = userSettings.instanceIsPasswordBased;\n const { currentIdentifier, nextIdentifier } = getIdentifierControlDisplayValues(\n identifierAttributes,\n identifierAttribute,\n );\n const instantPasswordField = useFormControl('password', '', {\n type: 'password',\n label: localizationKeys('formFieldLabel__password'),\n placeholder: localizationKeys('formFieldInputPlaceholder__password') as any,\n });\n\n const [alternativePhoneCodeProvider, setAlternativePhoneCodeProvider] = useState<PhoneCodeChannelData | null>(null);\n\n const showAlternativePhoneCodeProviders = userSettings.alternativePhoneCodeChannels.length > 0;\n\n const onAlternativePhoneCodeUseAnotherMethod = () => {\n setAlternativePhoneCodeProvider(null);\n };\n const onAlternativePhoneCodeProviderClick = (phoneCodeChannel: PhoneCodeChannel) => {\n const provider: PhoneCodeChannelData | null = getAlternativePhoneCodeProviderData(phoneCodeChannel) || null;\n setAlternativePhoneCodeProvider(provider);\n };\n\n const ctxInitialValues = ctx.initialValues || {};\n const initialValues: Record<SignInStartIdentifier, string | undefined> = useMemo(\n () => ({\n email_address: ctxInitialValues.emailAddress,\n email_address_username: ctxInitialValues.emailAddress || ctxInitialValues.username,\n username: ctxInitialValues.username,\n phone_number: ctxInitialValues.phoneNumber,\n }),\n [ctx.initialValues],\n );\n\n const hasSocialOrWeb3Buttons =\n !!authenticatableSocialStrategies.length || !!web3FirstFactors.length || !!alternativePhoneCodeChannels.length;\n const [shouldAutofocus, setShouldAutofocus] = useState(!isMobileDevice() && !hasSocialOrWeb3Buttons);\n // When the captcha escalates to an interactive challenge, spotlight it by collapsing/inerting the\n // rest of the card (see the descriptors.main column below).\n const [captchaIsInteractive, setCaptchaIsInteractive] = useState(false);\n const textIdentifierField = useFormControl('identifier', initialValues[identifierAttribute] || '', {\n ...currentIdentifier,\n isRequired: true,\n transformer: value => value.trim(),\n });\n\n const phoneIdentifierField = useFormControl('identifier', initialValues['phone_number'] || '', {\n ...currentIdentifier,\n isRequired: true,\n });\n\n const identifierField = identifierAttribute === 'phone_number' ? phoneIdentifierField : textIdentifierField;\n\n const switchToNextIdentifier = () => {\n setIdentifierAttribute(\n i => identifierAttributes[(identifierAttributes.indexOf(i) + 1) % identifierAttributes.length],\n );\n setShouldAutofocus(true);\n setHasSwitchedByAutofill(false);\n };\n\n const handlePhoneNumberPaste = (value: string) => {\n textIdentifierField.setValue(initialValues[identifierAttribute] || '');\n phoneIdentifierField.setValue(value);\n setIdentifierAttribute('phone_number');\n setShouldAutofocus(true);\n };\n\n // switch to the phone input (if available) if a \"+\" is entered\n // (either by the browser or the user)\n // this does not work in chrome as it does not fire the change event and the value is\n // not available via js\n useLayoutEffect(() => {\n if (\n identifierField.value.startsWith('+') &&\n identifierAttributes.includes('phone_number') &&\n identifierAttribute !== 'phone_number' &&\n !hasSwitchedByAutofill\n ) {\n handlePhoneNumberPaste(identifierField.value);\n // do not switch automatically on subsequent autofills\n // by the browser to avoid a switch loop\n setHasSwitchedByAutofill(true);\n }\n }, [identifierField.value, identifierAttributes]);\n\n const buildSignInParams = (fields: Array<FormControlState<string>>): SignInCreateParams => {\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n\n /**\n * FAPI will return an error when password is submitted but the user's email matches requires enterprise sso authentication.\n * We need to strip password from the create request, and reconstruct it later.\n */\n if (!hasPassword || userSettings.enterpriseSSO.enabled) {\n fields = fields.filter(f => f.name !== 'password');\n }\n return {\n ...buildRequest(fields),\n ...(hasPassword && !userSettings.enterpriseSSO.enabled && { strategy: 'password' }),\n } as SignInCreateParams;\n };\n\n const safePasswordSignInForEnterpriseSSOInstance = (\n signInCreatePromise: Promise<SignInResource>,\n fields: Array<FormControlState<string>>,\n ) => {\n return signInCreatePromise.then(signInResource => {\n if (!userSettings.enterpriseSSO.enabled) {\n return signInResource;\n }\n /**\n * For instances with Enterprise SSO enabled, perform sign in with password only when it is allowed for the identified user.\n */\n const passwordField = fields.find(f => f.name === 'password')?.value;\n if (!passwordField || signInResource.supportedFirstFactors?.some(ff => ff.strategy === 'enterprise_sso')) {\n return signInResource;\n }\n return signInResource.attemptFirstFactor({ strategy: 'password', password: passwordField });\n });\n };\n\n const signInWithFields = async (\n fields: Array<FormControlState<string>>,\n options?: { resetPasswordIntent?: boolean },\n ) => {\n // If the user has already selected an alternative phone code provider, we use that.\n const preferredAlternativePhoneChannel =\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannel(fields, authConfig.preferredChannels, 'identifier');\n if (preferredAlternativePhoneChannel) {\n // We need to send the alternative phone code provider channel in the sign in request\n // together with the phone_code strategy, in order for FAPI to create a Verification upon this first request.\n const noop = () => {};\n fields.push({\n id: 'strategy',\n value: 'phone_code',\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n fields.push({\n id: 'channel',\n value: preferredAlternativePhoneChannel,\n clearFeedback: noop,\n setValue: noop,\n onChange: noop,\n setError: noop,\n } as any);\n }\n try {\n // On top of the context-level preconditions, sign-up-if-missing only\n // supports identifiers that can be verified out-of-band.\n const hasPassword = fields.some(f => f.name === 'password' && !!f.value);\n const signUpAttribute = getSignUpAttributeFromIdentifier(identifierField);\n const shouldSignUpIfMissing = signUpIfMissingEnabled && signUpAttribute !== 'username' && !hasPassword;\n\n const res = await safePasswordSignInForEnterpriseSSOInstance(\n signIn.create({\n ...buildSignInParams(fields),\n ...(shouldSignUpIfMissing && { signUpIfMissing: true }),\n }),\n fields,\n );\n\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n\n switch (res.status) {\n case 'needs_identifier':\n // Check if we need to initiate an enterprise sso flow\n if (shouldHandOffUnidentifiedToEnterpriseConnection(res)) {\n await authenticateWithEnterpriseSSO();\n }\n break;\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n if (options?.resetPasswordIntent) {\n return navigate('factor-one', {\n searchParams: new URLSearchParams({ [SIGN_IN_RESET_PASSWORD_INTENT_PARAM]: 'true' }),\n });\n }\n return navigate('factor-one');\n }\n\n // Awaited so a failed hand-off reaches the catch below instead of escaping this try.\n return await authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n } catch (e: any) {\n return attemptToRecoverFromSignInError(e);\n }\n };\n\n const authenticateWithEnterpriseSSO = async () => {\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n\n try {\n await signIn.authenticateWithRedirect({\n strategy: 'enterprise_sso',\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n continueSignIn: true,\n });\n } catch (err) {\n // Preparing the hand-off can itself raise a challenge. No redirect was issued and the sign-in\n // is sitting on the gate instead. Handled here because the callers' recovery path drops\n // errors that didn't come from the API.\n if (isProtectCheckRequiredError(err) && navigateOnSignInProtectGate(signIn, navigate, 'protect-check')) {\n return;\n }\n throw err;\n }\n };\n\n const attemptToRecoverFromSignInError = async (e: any) => {\n if (!e.errors) {\n return;\n }\n const instantPasswordError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVALID_STRATEGY_FOR_USER ||\n e.code === ERROR_CODES.FORM_PASSWORD_INCORRECT ||\n e.code === ERROR_CODES.FORM_PASSWORD_PWNED,\n );\n\n const sessionAlreadyExistsError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n const alreadySignedInError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) => e.code === 'identifier_already_signed_in',\n );\n const accountDoesNotExistError: ClerkAPIError = e.errors.find(\n (e: ClerkAPIError) =>\n e.code === ERROR_CODES.INVITATION_ACCOUNT_NOT_EXISTS || e.code === ERROR_CODES.FORM_IDENTIFIER_NOT_FOUND,\n );\n\n if (instantPasswordError) {\n await signInWithFields([identifierField]);\n } else if (sessionAlreadyExistsError) {\n await clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (alreadySignedInError) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const sid = alreadySignedInError.meta!.sessionId!;\n await clerk.setActive({\n session: sid,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n } else if (isCombinedFlow && accountDoesNotExistError) {\n const attribute = getSignUpAttributeFromIdentifier(identifierField);\n\n if (userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST) {\n const waitlistUrl = clerk.buildWaitlistUrl(\n attribute === 'emailAddress'\n ? {\n initialValues: {\n [attribute]: identifierField.value,\n },\n }\n : {},\n );\n return navigate(waitlistUrl);\n }\n\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n\n return handleCombinedFlowTransfer({\n afterSignUpUrl: ctx.afterSignUpUrl || '/',\n clerk,\n handleError: e => handleError(e, [identifierField, instantPasswordField], card.setError),\n identifierAttribute: attribute,\n identifierValue: identifierField.value,\n navigate,\n organizationTicket,\n signUpMode: userSettings.signUp.mode,\n redirectUrl,\n redirectUrlComplete,\n oidcPrompt: ctx.oidcPrompt,\n navigateOnSetActive,\n passwordEnabled: userSettings.attributes.password?.required ?? false,\n alternativePhoneCodeChannel:\n alternativePhoneCodeProvider?.channel ||\n getPreferredAlternativePhoneChannelForCombinedFlow(\n authConfig.preferredChannels,\n attribute,\n identifierField.value,\n ),\n unsafeMetadata: ctx.unsafeMetadata,\n });\n } else {\n handleError(e, [identifierField, instantPasswordField], card.setError);\n }\n };\n\n useEffect(() => {\n if (!organizationTicket) {\n return;\n }\n\n if (clerkStatus === 'sign_up') {\n const paramsToForward = new URLSearchParams();\n if (organizationTicket) {\n paramsToForward.set('__clerk_ticket', organizationTicket);\n }\n // We explicitly navigate to 'create' in the combined flow to trigger a client-side navigation. Navigating to\n // signUpUrl triggers a full page reload when used with the hash router.\n void navigate(isCombinedFlow ? `create` : signUpUrl, { searchParams: paramsToForward });\n return;\n }\n\n status.setLoading();\n card.setLoading();\n signIn\n .create({\n strategy: 'ticket',\n ticket: organizationTicket,\n })\n .then(res => {\n if (navigateOnSignInProtectGate(res, navigate, 'protect-check')) {\n return;\n }\n switch (res.status) {\n case 'needs_first_factor': {\n if (!shouldHandOffToEnterpriseConnection(res)) {\n return navigate('factor-one');\n }\n\n return authenticateWithEnterpriseSSO();\n }\n case 'needs_second_factor':\n return navigate('factor-two');\n case 'needs_client_trust':\n return navigate('client-trust');\n case 'complete':\n removeClerkQueryParam('__clerk_ticket');\n return clerk.setActive({\n session: res.createdSessionId,\n navigate: async ({ session, decorateUrl }) => {\n await navigateOnSetActive({ session, redirectUrl: afterSignInUrl, decorateUrl });\n },\n });\n default: {\n console.error(clerkInvalidFAPIResponse(res.status, supportEmail));\n return;\n }\n }\n })\n .catch(err => {\n return attemptToRecoverFromSignInError(err);\n })\n .finally(() => {\n // Keep the card in loading state during SSO redirect to prevent UI flicker\n // This is necessary because there's a brief delay between initiating the SSO flow\n // and the actual redirect to the external Identity Provider\n const isRedirectingToSSOProvider = !!hasOnlyEnterpriseSSOFirstFactors(signIn);\n if (isRedirectingToSSOProvider) {\n return;\n }\n\n status.setIdle();\n card.setIdle();\n });\n }, []);\n\n useEffect(() => {\n async function handleOauthError() {\n const defaultErrorHandler = () => {\n // Error from server may be too much information for the end user, so set a generic error\n card.setError('Unable to complete action at this time. If the problem persists please contact support.');\n };\n\n const error = signIn?.firstFactorVerification?.error;\n if (error) {\n if (!card.error) {\n switch (error.code) {\n case ERROR_CODES.NOT_ALLOWED_TO_SIGN_UP:\n case ERROR_CODES.OAUTH_ACCESS_DENIED:\n case ERROR_CODES.NOT_ALLOWED_ACCESS:\n case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:\n case ERROR_CODES.USER_LOCKED:\n case ERROR_CODES.EXTERNAL_ACCOUNT_NOT_FOUND:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED:\n case ERROR_CODES.SIGN_UP_MODE_RESTRICTED_WAITLIST:\n case ERROR_CODES.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:\n case ERROR_CODES.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:\n case ERROR_CODES.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:\n case ERROR_CODES.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:\n case ERROR_CODES.CAPTCHA_INVALID:\n case ERROR_CODES.FRAUD_DEVICE_BLOCKED:\n case ERROR_CODES.FRAUD_ACTION_BLOCKED:\n case ERROR_CODES.SIGNUP_RATE_LIMIT_EXCEEDED:\n case ERROR_CODES.USER_BANNED:\n case ERROR_CODES.USER_DEACTIVATED:\n card.setError(error);\n break;\n default:\n defaultErrorHandler();\n }\n }\n\n // TODO: This is a workaround in order to reset the sign in attempt\n // so that the oauth error does not persist on full page reloads.\n void (await signIn.create({}));\n }\n }\n\n void handleOauthError();\n }, []);\n\n const handleFirstPartySubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n return signInWithFields([identifierField, instantPasswordField]);\n };\n\n const handleForgotPasswordClick: React.MouseEventHandler = e => {\n e.preventDefault();\n // Surface the same native required-field validation as the Continue button\n // when the identifier is missing\n const form = e.currentTarget.closest('form');\n if (form && !form.reportValidity()) {\n return;\n }\n void signInWithFields([identifierField], { resetPasswordIntent: true });\n };\n\n const DynamicField = useMemo(() => {\n const components = {\n tel: Form.PhoneInput,\n password: Form.PasswordInput,\n text: Form.PlainInput,\n email: Form.PlainInput,\n };\n\n return components[identifierField.type as keyof typeof components];\n }, [identifierField.type]);\n\n if (status.isLoading || clerkStatus === 'sign_up') {\n // clerkStatus being sign_up will trigger a navigation to the sign up flow, so show a loading card instead of\n // rendering the sign in flow.\n return <LoadingCard />;\n }\n\n // @ts-expect-error `action` is not typed\n const { action, validLastAuthenticationStrategies, ...identifierFieldProps } = identifierField.props;\n\n const lastAuthenticationStrategy = clerk.client?.lastAuthenticationStrategy;\n const isIdentifierLastAuthenticationStrategy =\n lastAuthenticationStrategy && totalEnabledAuthMethods > 1\n ? validLastAuthenticationStrategies?.has(lastAuthenticationStrategy)\n : false;\n\n const blockedDetails = actionBlockedDetailsFrom(card.rawError);\n if (blockedDetails) {\n return <ActionBlockedCard details={blockedDetails} />;\n }\n\n return (\n <Flow.Part part='start'>\n {!alternativePhoneCodeProvider ? (\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.titleCombined')\n : localizationKeys('signIn.start.title')\n }\n />\n <Header.Subtitle\n localizationKey={\n isCombinedFlow\n ? localizationKeys('signIn.start.subtitleCombined')\n : localizationKeys('signIn.start.subtitle')\n }\n sx={{\n '&:empty': {\n display: 'none',\n },\n }}\n />\n </Header.Root>\n <Card.Alert>{card.error}</Card.Alert>\n {/*TODO: extract main in its own component */}\n <Col\n elementDescriptor={descriptors.main}\n gap={6}\n {...inertProps(captchaIsInteractive)}\n // `display:none` (not `visibility:hidden`) so the collapsed column leaves flex flow and\n // contributes no `gap` gutter to `Card.Content` — otherwise it injects empty space above\n // the spotlighted captcha. Subtree stays mounted (form state preserved); `inert` is then\n // redundant-but-harmless.\n sx={captchaIsInteractive ? { display: 'none' } : undefined}\n >\n <SocialButtonsReversibleContainerWithDivider>\n {hasSocialOrWeb3Buttons && (\n <SignInSocialButtons\n enableWeb3Providers\n enableOAuthProviders\n enableAlternativePhoneCodeProviders={showAlternativePhoneCodeProviders}\n onAlternativePhoneCodeProviderClick={onAlternativePhoneCodeProviderClick}\n />\n )}\n {standardFormAttributes.length ? (\n <Form.Root\n onSubmit={handleFirstPartySubmit}\n gap={8}\n >\n <Col gap={6}>\n <Form.ControlRow elementId={identifierField.id}>\n <DynamicField\n actionLabel={nextIdentifier?.action}\n onActionClicked={switchToNextIdentifier}\n {...identifierFieldProps}\n autoFocus={shouldAutofocus}\n autoComplete={\n isWebAuthnAutofillSupported\n ? `${currentIdentifier.autoComplete} webauthn`\n : currentIdentifier.autoComplete\n }\n isLastAuthenticationStrategy={isIdentifierLastAuthenticationStrategy}\n />\n </Form.ControlRow>\n <InstantPasswordRow\n field={passwordBasedInstance ? instantPasswordField : undefined}\n onForgotPasswordClick={handleForgotPasswordClick}\n />\n </Col>\n <Col center>\n <Form.SubmitButton hasArrow />\n </Col>\n </Form.Root>\n ) : null}\n </SocialButtonsReversibleContainerWithDivider>\n </Col>\n <CaptchaElement\n gapless\n onInteractiveChange={setCaptchaIsInteractive}\n />\n {/* Kept outside descriptors.main so the spotlight's `inert` leaves this alternative action reachable. */}\n {userSettings.attributes.passkey?.enabled &&\n userSettings.passkeySettings.show_sign_in_button &&\n isWebSupported && (\n <Card.Action elementId={'usePasskey'}>\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__use_passkey')}\n onClick={() => authenticateWithPasskey({ flow: 'discoverable' })}\n />\n </Card.Action>\n )}\n </Card.Content>\n <Card.Footer>\n {userSettings.signUp.mode === SIGN_UP_MODES.PUBLIC && !isCombinedFlow && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink')}\n to={clerk.buildUrlWithAuth(signUpUrl)}\n />\n </Card.Action>\n )}\n {userSettings.signUp.mode === SIGN_UP_MODES.WAITLIST && (\n <Card.Action elementId='signIn'>\n <Card.ActionText localizationKey={localizationKeys('signIn.start.actionText__join_waitlist')} />\n <Card.ActionLink\n localizationKey={localizationKeys('signIn.start.actionLink__join_waitlist')}\n to={clerk.buildUrlWithAuth(waitlistUrl)}\n />\n </Card.Action>\n )}\n </Card.Footer>\n </Card.Root>\n ) : (\n <SignInAlternativePhoneCodePhoneNumberCard\n handleSubmit={handleFirstPartySubmit}\n phoneNumberFormState={phoneIdentifierField}\n onUseAnotherMethod={onAlternativePhoneCodeUseAnotherMethod}\n phoneCodeProvider={alternativePhoneCodeProvider}\n />\n )}\n </Flow.Part>\n );\n}\n\nconst InstantPasswordRow = ({\n field,\n onForgotPasswordClick,\n}: {\n field?: FormControlState<'password'>;\n onForgotPasswordClick?: React.MouseEventHandler;\n}) => {\n const [autofilled, setAutofilled] = useState(false);\n const ref = useRef<HTMLInputElement>(null);\n const show = !!(autofilled || field?.value);\n\n // show password if it's autofilled by the browser\n useLayoutEffect(() => {\n const intervalId = setInterval(() => {\n if (ref?.current) {\n const autofilled =\n window.getComputedStyle(ref.current, ':autofill').animationName === 'onAutoFillStart' ||\n // https://github.com/facebook/react/issues/1159#issuecomment-1025423604\n !!ref.current?.matches('*:-webkit-autofill');\n if (autofilled) {\n setAutofilled(autofilled);\n clearInterval(intervalId);\n }\n }\n }, 500);\n\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n useEffect(() => {\n //if the field receives a value, we default to normal behaviour\n if (field?.value && field.value !== '') {\n setAutofilled(false);\n }\n }, [field?.value]);\n\n if (!field) {\n return null;\n }\n\n return (\n <Form.ControlRow\n elementId={field.id}\n aria-hidden={show ? undefined : true}\n sx={\n show\n ? undefined\n : {\n position: 'absolute',\n opacity: 0,\n height: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n marginTop: '-1rem',\n }\n }\n >\n <Form.PasswordInput\n {...field.props}\n actionLabel={show ? localizationKeys('formFieldAction__forgotPassword') : undefined}\n onActionClicked={show ? onForgotPasswordClick : undefined}\n tabIndex={show ? undefined : -1}\n ref={ref}\n />\n </Form.ControlRow>\n );\n};\n\nexport const SignInStart = withRedirectToSignInTask(\n withRedirectToAfterSignIn(withCardStateProvider(SignInStartInternal)),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,2BAA2B;CAC/B,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,uBAAuB,SAAS,YAAY;CAClD,MAAM,0BAA0B,iCAAiC,gBAAgB,eAAe;CAChG,MAAM,EAAE,iBAAiB,eAAe;CACxC,MAAM,EAAE,iBAAiB,eAAe;CAExC,MAAM,EAAE,2CAA2C,SAAS;CAE5D,gBAAgB;EACd,eAAe,qBAAqB;GAClC,MAAM,eAAe,OAAO,0CAA0C,4BAA2B,CAAE;GACnG,eAAe,YAAY;GAC3B,IAAI,CAAC,cACH;GAGF,MAAM,wBAAwB,EAAE,MAAM,WAAW,CAAC;EACpD;EAEA,IAAI,gBAAgB,kBAAkB,WAAW,SAAS,SACxD,mBAAmB;CAEvB,GAAG,CAAC,CAAC;CAEL,OAAO,EACL,6BAA6B,YAC/B;AACF;AAEA,SAAS,sBAAmC;CAC1C,MAAM,OAAO,aAAa;CAC1B,MAAM,QAAQ,SAAS;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,cAAc,eAAe,eAAe;CACpD,MAAM,SAAS,cAAc;CAC7B,MAAM,EAAE,aAAa,UAAU;CAC/B,MAAM,MAAM,iBAAiB;CAC7B,MAAM,EAAE,gBAAgB,WAAW,aAAa,gBAAgB,wBAAwB,wBAAwB;CAChH,MAAM,eAAe,gBAAgB;CACrC,MAAM,0BAA0B,2BAA2B;CAC3D,MAAM,uBAAuB,cACrB,iBAAiB,aAAa,6BAA6B,GACjE,CAAC,aAAa,6BAA6B,CAC7C;CACA,MAAM,+BAA+B,aAAa;;;;CAKlD,MAAM,EAAE,gCAAgC,mBAAmB;CAC3D,MAAM,uBA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