@clerk/shared 4.40.1-canary.v20261020162624 → 4.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/clerk-js/constants.d.mts +1 -1
- package/dist/internal/clerk-js/constants.d.ts +1 -1
- package/dist/internal/clerk-js/constants.js +1 -1
- package/dist/internal/clerk-js/constants.js.map +1 -1
- package/dist/internal/clerk-js/constants.mjs +1 -1
- package/dist/internal/clerk-js/constants.mjs.map +1 -1
- package/dist/internal/clerk-js/errors.d.mts +5 -1
- package/dist/internal/clerk-js/errors.d.ts +5 -1
- package/dist/internal/clerk-js/errors.js +7 -0
- package/dist/internal/clerk-js/errors.js.map +1 -1
- package/dist/internal/clerk-js/errors.mjs +7 -1
- package/dist/internal/clerk-js/errors.mjs.map +1 -1
- package/dist/loadClerkJsScript.js +1 -1
- package/dist/loadClerkJsScript.js.map +1 -1
- package/dist/loadClerkJsScript.mjs +1 -1
- package/dist/loadClerkJsScript.mjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/localization.d.mts +9 -0
- package/dist/types/localization.d.ts +9 -0
- package/dist/types/session.d.mts +18 -4
- package/dist/types/session.d.ts +18 -4
- package/dist/types/sessionVerification.d.mts +1 -1
- package/dist/types/sessionVerification.d.ts +1 -1
- package/dist/types/signInCommon.d.mts +13 -3
- package/dist/types/signInCommon.d.ts +13 -3
- package/dist/types/signInFuture.d.mts +10 -1
- package/dist/types/signInFuture.d.ts +10 -1
- package/dist/versionSelector.js +1 -1
- package/dist/versionSelector.js.map +1 -1
- package/dist/versionSelector.mjs +1 -1
- package/dist/versionSelector.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -49,7 +49,7 @@ declare const SIGN_UP_MODES: {
|
|
|
49
49
|
RESTRICTED: "restricted";
|
|
50
50
|
WAITLIST: "waitlist";
|
|
51
51
|
};
|
|
52
|
-
declare const SUPPORTED_FAPI_VERSION = "2026-
|
|
52
|
+
declare const SUPPORTED_FAPI_VERSION = "2026-08-20";
|
|
53
53
|
declare const CAPTCHA_ELEMENT_ID = "clerk-captcha";
|
|
54
54
|
declare const CAPTCHA_INVISIBLE_CLASSNAME = "clerk-invisible-captcha";
|
|
55
55
|
//#endregion
|
|
@@ -49,7 +49,7 @@ declare const SIGN_UP_MODES: {
|
|
|
49
49
|
RESTRICTED: "restricted";
|
|
50
50
|
WAITLIST: "waitlist";
|
|
51
51
|
};
|
|
52
|
-
declare const SUPPORTED_FAPI_VERSION = "2026-
|
|
52
|
+
declare const SUPPORTED_FAPI_VERSION = "2026-08-20";
|
|
53
53
|
declare const CAPTCHA_ELEMENT_ID = "clerk-captcha";
|
|
54
54
|
declare const CAPTCHA_INVISIBLE_CLASSNAME = "clerk-invisible-captcha";
|
|
55
55
|
//#endregion
|
|
@@ -71,7 +71,7 @@ const SIGN_UP_MODES = {
|
|
|
71
71
|
RESTRICTED: "restricted",
|
|
72
72
|
WAITLIST: "waitlist"
|
|
73
73
|
};
|
|
74
|
-
const SUPPORTED_FAPI_VERSION = "2026-
|
|
74
|
+
const SUPPORTED_FAPI_VERSION = "2026-08-20";
|
|
75
75
|
const CAPTCHA_ELEMENT_ID = "clerk-captcha";
|
|
76
76
|
const CAPTCHA_INVISIBLE_CLASSNAME = "clerk-invisible-captcha";
|
|
77
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":[],"sources":["../../../src/internal/clerk-js/constants.ts"],"sourcesContent":["import type { SignUpModes } from '../../types';\n\n// TODO: Do we still have a use for this or can we simply preserve all params?\nexport const PRESERVED_QUERYSTRING_PARAMS = [\n 'redirect_url',\n 'after_sign_in_url',\n 'after_sign_up_url',\n 'sign_in_force_redirect_url',\n 'sign_in_fallback_redirect_url',\n 'sign_up_force_redirect_url',\n 'sign_up_fallback_redirect_url',\n];\n\nexport const CLERK_MODAL_STATE = '__clerk_modal_state';\nexport const CLERK_SYNCED = '__clerk_synced';\nexport const CLERK_SYNCED_STATUS = {\n /** Not synced - satellite needs handshake after returning from primary sign-in */\n NeedsSync: 'false',\n /** Sync completed - prevents re-sync loop after handshake completes */\n Completed: 'true',\n} as const;\nexport const CLERK_SUFFIXED_COOKIES = 'suffixed_cookies';\nexport const CLERK_SATELLITE_URL = '__clerk_satellite_url';\nexport const ERROR_CODES = {\n FORM_IDENTIFIER_NOT_FOUND: 'form_identifier_not_found',\n FORM_PASSWORD_INCORRECT: 'form_password_incorrect',\n FORM_PASSWORD_PWNED: 'form_password_pwned',\n INVALID_STRATEGY_FOR_USER: 'strategy_for_user_invalid',\n NOT_ALLOWED_TO_SIGN_UP: 'not_allowed_to_sign_up',\n OAUTH_ACCESS_DENIED: 'oauth_access_denied',\n OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML: 'oauth_email_domain_reserved_by_saml',\n NOT_ALLOWED_ACCESS: 'not_allowed_access',\n SAML_USER_ATTRIBUTE_MISSING: 'saml_user_attribute_missing',\n USER_LOCKED: 'user_locked',\n EXTERNAL_ACCOUNT_NOT_FOUND: 'external_account_not_found',\n EXTERNAL_ACCOUNT_EXISTS: 'external_account_exists',\n SESSION_EXISTS: 'session_exists',\n SIGN_UP_MODE_RESTRICTED: 'sign_up_mode_restricted',\n SIGN_UP_MODE_RESTRICTED_WAITLIST: 'sign_up_restricted_waitlist',\n ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING: 'enterprise_sso_user_attribute_missing',\n ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'enterprise_sso_email_address_domain_mismatch',\n ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH: 'enterprise_sso_hosted_domain_mismatch',\n SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'saml_email_address_domain_mismatch',\n INVITATION_ACCOUNT_NOT_EXISTS: 'invitation_account_not_exists',\n ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO: 'organization_membership_quota_exceeded_for_sso',\n CAPTCHA_INVALID: 'captcha_invalid',\n FRAUD_DEVICE_BLOCKED: 'device_blocked',\n FRAUD_ACTION_BLOCKED: 'action_blocked',\n PROTECT_CHECK_ALREADY_RESOLVED: 'protect_check_already_resolved',\n PROTECT_CHECK_REQUIRED: 'protect_check_required',\n PROTECT_CHECK_TIMED_OUT: 'protect_check_timed_out',\n PROTECT_CHECK_UNSUPPORTED_ENVIRONMENT: 'protect_check_unsupported_environment',\n SIGNUP_RATE_LIMIT_EXCEEDED: 'signup_rate_limit_exceeded',\n USER_BANNED: 'user_banned',\n USER_DEACTIVATED: 'user_deactivated',\n} as const;\n\nexport const SIGN_IN_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username'];\nexport const SIGN_UP_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username', 'first_name', 'last_name'];\n\nexport const DEBOUNCE_MS = 350;\n\nexport const SIGN_UP_MODES = {\n PUBLIC: 'public',\n RESTRICTED: 'restricted',\n WAITLIST: 'waitlist',\n} satisfies Record<string, SignUpModes>;\n\n// This is the currently supported version of the Frontend API\nexport const SUPPORTED_FAPI_VERSION = '2026-
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../../src/internal/clerk-js/constants.ts"],"sourcesContent":["import type { SignUpModes } from '../../types';\n\n// TODO: Do we still have a use for this or can we simply preserve all params?\nexport const PRESERVED_QUERYSTRING_PARAMS = [\n 'redirect_url',\n 'after_sign_in_url',\n 'after_sign_up_url',\n 'sign_in_force_redirect_url',\n 'sign_in_fallback_redirect_url',\n 'sign_up_force_redirect_url',\n 'sign_up_fallback_redirect_url',\n];\n\nexport const CLERK_MODAL_STATE = '__clerk_modal_state';\nexport const CLERK_SYNCED = '__clerk_synced';\nexport const CLERK_SYNCED_STATUS = {\n /** Not synced - satellite needs handshake after returning from primary sign-in */\n NeedsSync: 'false',\n /** Sync completed - prevents re-sync loop after handshake completes */\n Completed: 'true',\n} as const;\nexport const CLERK_SUFFIXED_COOKIES = 'suffixed_cookies';\nexport const CLERK_SATELLITE_URL = '__clerk_satellite_url';\nexport const ERROR_CODES = {\n FORM_IDENTIFIER_NOT_FOUND: 'form_identifier_not_found',\n FORM_PASSWORD_INCORRECT: 'form_password_incorrect',\n FORM_PASSWORD_PWNED: 'form_password_pwned',\n INVALID_STRATEGY_FOR_USER: 'strategy_for_user_invalid',\n NOT_ALLOWED_TO_SIGN_UP: 'not_allowed_to_sign_up',\n OAUTH_ACCESS_DENIED: 'oauth_access_denied',\n OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML: 'oauth_email_domain_reserved_by_saml',\n NOT_ALLOWED_ACCESS: 'not_allowed_access',\n SAML_USER_ATTRIBUTE_MISSING: 'saml_user_attribute_missing',\n USER_LOCKED: 'user_locked',\n EXTERNAL_ACCOUNT_NOT_FOUND: 'external_account_not_found',\n EXTERNAL_ACCOUNT_EXISTS: 'external_account_exists',\n SESSION_EXISTS: 'session_exists',\n SIGN_UP_MODE_RESTRICTED: 'sign_up_mode_restricted',\n SIGN_UP_MODE_RESTRICTED_WAITLIST: 'sign_up_restricted_waitlist',\n ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING: 'enterprise_sso_user_attribute_missing',\n ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'enterprise_sso_email_address_domain_mismatch',\n ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH: 'enterprise_sso_hosted_domain_mismatch',\n SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'saml_email_address_domain_mismatch',\n INVITATION_ACCOUNT_NOT_EXISTS: 'invitation_account_not_exists',\n ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO: 'organization_membership_quota_exceeded_for_sso',\n CAPTCHA_INVALID: 'captcha_invalid',\n FRAUD_DEVICE_BLOCKED: 'device_blocked',\n FRAUD_ACTION_BLOCKED: 'action_blocked',\n PROTECT_CHECK_ALREADY_RESOLVED: 'protect_check_already_resolved',\n PROTECT_CHECK_REQUIRED: 'protect_check_required',\n PROTECT_CHECK_TIMED_OUT: 'protect_check_timed_out',\n PROTECT_CHECK_UNSUPPORTED_ENVIRONMENT: 'protect_check_unsupported_environment',\n SIGNUP_RATE_LIMIT_EXCEEDED: 'signup_rate_limit_exceeded',\n USER_BANNED: 'user_banned',\n USER_DEACTIVATED: 'user_deactivated',\n} as const;\n\nexport const SIGN_IN_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username'];\nexport const SIGN_UP_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username', 'first_name', 'last_name'];\n\nexport const DEBOUNCE_MS = 350;\n\nexport const SIGN_UP_MODES = {\n PUBLIC: 'public',\n RESTRICTED: 'restricted',\n WAITLIST: 'waitlist',\n} satisfies Record<string, SignUpModes>;\n\n// This is the currently supported version of the Frontend API\nexport const SUPPORTED_FAPI_VERSION = '2026-08-20';\n\nexport const CAPTCHA_ELEMENT_ID = 'clerk-captcha';\nexport const CAPTCHA_INVISIBLE_CLASSNAME = 'clerk-invisible-captcha';\n"],"mappings":";;;AAGA,MAAa,+BAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB;AACjC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;;CAEjC,WAAW;;CAEX,WAAW;AACb;AACA,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,cAAc;CACzB,2BAA2B;CAC3B,yBAAyB;CACzB,qBAAqB;CACrB,2BAA2B;CAC3B,wBAAwB;CACxB,qBAAqB;CACrB,qCAAqC;CACrC,oBAAoB;CACpB,6BAA6B;CAC7B,aAAa;CACb,4BAA4B;CAC5B,yBAAyB;CACzB,gBAAgB;CAChB,yBAAyB;CACzB,kCAAkC;CAClC,uCAAuC;CACvC,8CAA8C;CAC9C,uCAAuC;CACvC,oCAAoC;CACpC,+BAA+B;CAC/B,gDAAgD;CAChD,iBAAiB;CACjB,sBAAsB;CACtB,sBAAsB;CACtB,gCAAgC;CAChC,wBAAwB;CACxB,yBAAyB;CACzB,uCAAuC;CACvC,4BAA4B;CAC5B,aAAa;CACb,kBAAkB;AACpB;AAEA,MAAa,6BAA6B;CAAC;CAAiB;CAAgB;AAAU;AACtF,MAAa,6BAA6B;CAAC;CAAiB;CAAgB;CAAY;CAAc;AAAW;AAEjH,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,QAAQ;CACR,YAAY;CACZ,UAAU;AACZ;AAGA,MAAa,yBAAyB;AAEtC,MAAa,qBAAqB;AAClC,MAAa,8BAA8B"}
|
|
@@ -69,7 +69,7 @@ const SIGN_UP_MODES = {
|
|
|
69
69
|
RESTRICTED: "restricted",
|
|
70
70
|
WAITLIST: "waitlist"
|
|
71
71
|
};
|
|
72
|
-
const SUPPORTED_FAPI_VERSION = "2026-
|
|
72
|
+
const SUPPORTED_FAPI_VERSION = "2026-08-20";
|
|
73
73
|
const CAPTCHA_ELEMENT_ID = "clerk-captcha";
|
|
74
74
|
const CAPTCHA_INVISIBLE_CLASSNAME = "clerk-invisible-captcha";
|
|
75
75
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../src/internal/clerk-js/constants.ts"],"sourcesContent":["import type { SignUpModes } from '../../types';\n\n// TODO: Do we still have a use for this or can we simply preserve all params?\nexport const PRESERVED_QUERYSTRING_PARAMS = [\n 'redirect_url',\n 'after_sign_in_url',\n 'after_sign_up_url',\n 'sign_in_force_redirect_url',\n 'sign_in_fallback_redirect_url',\n 'sign_up_force_redirect_url',\n 'sign_up_fallback_redirect_url',\n];\n\nexport const CLERK_MODAL_STATE = '__clerk_modal_state';\nexport const CLERK_SYNCED = '__clerk_synced';\nexport const CLERK_SYNCED_STATUS = {\n /** Not synced - satellite needs handshake after returning from primary sign-in */\n NeedsSync: 'false',\n /** Sync completed - prevents re-sync loop after handshake completes */\n Completed: 'true',\n} as const;\nexport const CLERK_SUFFIXED_COOKIES = 'suffixed_cookies';\nexport const CLERK_SATELLITE_URL = '__clerk_satellite_url';\nexport const ERROR_CODES = {\n FORM_IDENTIFIER_NOT_FOUND: 'form_identifier_not_found',\n FORM_PASSWORD_INCORRECT: 'form_password_incorrect',\n FORM_PASSWORD_PWNED: 'form_password_pwned',\n INVALID_STRATEGY_FOR_USER: 'strategy_for_user_invalid',\n NOT_ALLOWED_TO_SIGN_UP: 'not_allowed_to_sign_up',\n OAUTH_ACCESS_DENIED: 'oauth_access_denied',\n OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML: 'oauth_email_domain_reserved_by_saml',\n NOT_ALLOWED_ACCESS: 'not_allowed_access',\n SAML_USER_ATTRIBUTE_MISSING: 'saml_user_attribute_missing',\n USER_LOCKED: 'user_locked',\n EXTERNAL_ACCOUNT_NOT_FOUND: 'external_account_not_found',\n EXTERNAL_ACCOUNT_EXISTS: 'external_account_exists',\n SESSION_EXISTS: 'session_exists',\n SIGN_UP_MODE_RESTRICTED: 'sign_up_mode_restricted',\n SIGN_UP_MODE_RESTRICTED_WAITLIST: 'sign_up_restricted_waitlist',\n ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING: 'enterprise_sso_user_attribute_missing',\n ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'enterprise_sso_email_address_domain_mismatch',\n ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH: 'enterprise_sso_hosted_domain_mismatch',\n SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'saml_email_address_domain_mismatch',\n INVITATION_ACCOUNT_NOT_EXISTS: 'invitation_account_not_exists',\n ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO: 'organization_membership_quota_exceeded_for_sso',\n CAPTCHA_INVALID: 'captcha_invalid',\n FRAUD_DEVICE_BLOCKED: 'device_blocked',\n FRAUD_ACTION_BLOCKED: 'action_blocked',\n PROTECT_CHECK_ALREADY_RESOLVED: 'protect_check_already_resolved',\n PROTECT_CHECK_REQUIRED: 'protect_check_required',\n PROTECT_CHECK_TIMED_OUT: 'protect_check_timed_out',\n PROTECT_CHECK_UNSUPPORTED_ENVIRONMENT: 'protect_check_unsupported_environment',\n SIGNUP_RATE_LIMIT_EXCEEDED: 'signup_rate_limit_exceeded',\n USER_BANNED: 'user_banned',\n USER_DEACTIVATED: 'user_deactivated',\n} as const;\n\nexport const SIGN_IN_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username'];\nexport const SIGN_UP_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username', 'first_name', 'last_name'];\n\nexport const DEBOUNCE_MS = 350;\n\nexport const SIGN_UP_MODES = {\n PUBLIC: 'public',\n RESTRICTED: 'restricted',\n WAITLIST: 'waitlist',\n} satisfies Record<string, SignUpModes>;\n\n// This is the currently supported version of the Frontend API\nexport const SUPPORTED_FAPI_VERSION = '2026-
|
|
1
|
+
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../src/internal/clerk-js/constants.ts"],"sourcesContent":["import type { SignUpModes } from '../../types';\n\n// TODO: Do we still have a use for this or can we simply preserve all params?\nexport const PRESERVED_QUERYSTRING_PARAMS = [\n 'redirect_url',\n 'after_sign_in_url',\n 'after_sign_up_url',\n 'sign_in_force_redirect_url',\n 'sign_in_fallback_redirect_url',\n 'sign_up_force_redirect_url',\n 'sign_up_fallback_redirect_url',\n];\n\nexport const CLERK_MODAL_STATE = '__clerk_modal_state';\nexport const CLERK_SYNCED = '__clerk_synced';\nexport const CLERK_SYNCED_STATUS = {\n /** Not synced - satellite needs handshake after returning from primary sign-in */\n NeedsSync: 'false',\n /** Sync completed - prevents re-sync loop after handshake completes */\n Completed: 'true',\n} as const;\nexport const CLERK_SUFFIXED_COOKIES = 'suffixed_cookies';\nexport const CLERK_SATELLITE_URL = '__clerk_satellite_url';\nexport const ERROR_CODES = {\n FORM_IDENTIFIER_NOT_FOUND: 'form_identifier_not_found',\n FORM_PASSWORD_INCORRECT: 'form_password_incorrect',\n FORM_PASSWORD_PWNED: 'form_password_pwned',\n INVALID_STRATEGY_FOR_USER: 'strategy_for_user_invalid',\n NOT_ALLOWED_TO_SIGN_UP: 'not_allowed_to_sign_up',\n OAUTH_ACCESS_DENIED: 'oauth_access_denied',\n OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML: 'oauth_email_domain_reserved_by_saml',\n NOT_ALLOWED_ACCESS: 'not_allowed_access',\n SAML_USER_ATTRIBUTE_MISSING: 'saml_user_attribute_missing',\n USER_LOCKED: 'user_locked',\n EXTERNAL_ACCOUNT_NOT_FOUND: 'external_account_not_found',\n EXTERNAL_ACCOUNT_EXISTS: 'external_account_exists',\n SESSION_EXISTS: 'session_exists',\n SIGN_UP_MODE_RESTRICTED: 'sign_up_mode_restricted',\n SIGN_UP_MODE_RESTRICTED_WAITLIST: 'sign_up_restricted_waitlist',\n ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING: 'enterprise_sso_user_attribute_missing',\n ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'enterprise_sso_email_address_domain_mismatch',\n ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH: 'enterprise_sso_hosted_domain_mismatch',\n SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH: 'saml_email_address_domain_mismatch',\n INVITATION_ACCOUNT_NOT_EXISTS: 'invitation_account_not_exists',\n ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO: 'organization_membership_quota_exceeded_for_sso',\n CAPTCHA_INVALID: 'captcha_invalid',\n FRAUD_DEVICE_BLOCKED: 'device_blocked',\n FRAUD_ACTION_BLOCKED: 'action_blocked',\n PROTECT_CHECK_ALREADY_RESOLVED: 'protect_check_already_resolved',\n PROTECT_CHECK_REQUIRED: 'protect_check_required',\n PROTECT_CHECK_TIMED_OUT: 'protect_check_timed_out',\n PROTECT_CHECK_UNSUPPORTED_ENVIRONMENT: 'protect_check_unsupported_environment',\n SIGNUP_RATE_LIMIT_EXCEEDED: 'signup_rate_limit_exceeded',\n USER_BANNED: 'user_banned',\n USER_DEACTIVATED: 'user_deactivated',\n} as const;\n\nexport const SIGN_IN_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username'];\nexport const SIGN_UP_INITIAL_VALUE_KEYS = ['email_address', 'phone_number', 'username', 'first_name', 'last_name'];\n\nexport const DEBOUNCE_MS = 350;\n\nexport const SIGN_UP_MODES = {\n PUBLIC: 'public',\n RESTRICTED: 'restricted',\n WAITLIST: 'waitlist',\n} satisfies Record<string, SignUpModes>;\n\n// This is the currently supported version of the Frontend API\nexport const SUPPORTED_FAPI_VERSION = '2026-08-20';\n\nexport const CAPTCHA_ELEMENT_ID = 'clerk-captcha';\nexport const CAPTCHA_INVISIBLE_CLASSNAME = 'clerk-invisible-captcha';\n"],"mappings":";AAGA,MAAa,+BAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB;AACjC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;;CAEjC,WAAW;;CAEX,WAAW;AACb;AACA,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,cAAc;CACzB,2BAA2B;CAC3B,yBAAyB;CACzB,qBAAqB;CACrB,2BAA2B;CAC3B,wBAAwB;CACxB,qBAAqB;CACrB,qCAAqC;CACrC,oBAAoB;CACpB,6BAA6B;CAC7B,aAAa;CACb,4BAA4B;CAC5B,yBAAyB;CACzB,gBAAgB;CAChB,yBAAyB;CACzB,kCAAkC;CAClC,uCAAuC;CACvC,8CAA8C;CAC9C,uCAAuC;CACvC,oCAAoC;CACpC,+BAA+B;CAC/B,gDAAgD;CAChD,iBAAiB;CACjB,sBAAsB;CACtB,sBAAsB;CACtB,gCAAgC;CAChC,wBAAwB;CACxB,yBAAyB;CACzB,uCAAuC;CACvC,4BAA4B;CAC5B,aAAa;CACb,kBAAkB;AACpB;AAEA,MAAa,6BAA6B;CAAC;CAAiB;CAAgB;AAAU;AACtF,MAAa,6BAA6B;CAAC;CAAiB;CAAgB;CAAY;CAAc;AAAW;AAEjH,MAAa,cAAc;AAE3B,MAAa,gBAAgB;CAC3B,QAAQ;CACR,YAAY;CACZ,UAAU;AACZ;AAGA,MAAa,yBAAyB;AAEtC,MAAa,qBAAqB;AAClC,MAAa,8BAA8B"}
|
|
@@ -56,6 +56,10 @@ declare function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'Sig
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
declare function clerkInvalidStrategy(functionaName: string, strategy: string): never;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
declare function clerkInvalidVerificationLevel(functionName: string, level: string): never;
|
|
59
63
|
/**
|
|
60
64
|
*
|
|
61
65
|
*/
|
|
@@ -109,5 +113,5 @@ declare function clerkUnsupportedReloadMethod(className: string): never;
|
|
|
109
113
|
*/
|
|
110
114
|
declare function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never;
|
|
111
115
|
//#endregion
|
|
112
|
-
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
116
|
+
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkInvalidVerificationLevel, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
113
117
|
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -56,6 +56,10 @@ declare function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'Sig
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
declare function clerkInvalidStrategy(functionaName: string, strategy: string): never;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
declare function clerkInvalidVerificationLevel(functionName: string, level: string): never;
|
|
59
63
|
/**
|
|
60
64
|
*
|
|
61
65
|
*/
|
|
@@ -109,5 +113,5 @@ declare function clerkUnsupportedReloadMethod(className: string): never;
|
|
|
109
113
|
*/
|
|
110
114
|
declare function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never;
|
|
111
115
|
//#endregion
|
|
112
|
-
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
116
|
+
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkInvalidVerificationLevel, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
113
117
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -88,6 +88,12 @@ function clerkInvalidStrategy(functionaName, strategy) {
|
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
90
|
*/
|
|
91
|
+
function clerkInvalidVerificationLevel(functionName, level) {
|
|
92
|
+
throw new Error(`${errorPrefix} "${level}" is not a valid verification level for ${functionName}. Use 'first_factor' or 'second_factor'.`);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
91
97
|
function clerkVerifyWeb3WalletCalledBeforeCreate(type) {
|
|
92
98
|
throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`);
|
|
93
99
|
}
|
|
@@ -176,6 +182,7 @@ exports.clerkInvalidRoutingStrategy = clerkInvalidRoutingStrategy;
|
|
|
176
182
|
exports.clerkInvalidSignInUrlFormat = clerkInvalidSignInUrlFormat;
|
|
177
183
|
exports.clerkInvalidSignInUrlOrigin = clerkInvalidSignInUrlOrigin;
|
|
178
184
|
exports.clerkInvalidStrategy = clerkInvalidStrategy;
|
|
185
|
+
exports.clerkInvalidVerificationLevel = clerkInvalidVerificationLevel;
|
|
179
186
|
exports.clerkMissingDevBrowser = clerkMissingDevBrowser;
|
|
180
187
|
exports.clerkMissingFapiClientInResources = clerkMissingFapiClientInResources;
|
|
181
188
|
exports.clerkMissingOptionError = clerkMissingOptionError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":[],"sources":["../../../src/internal/clerk-js/errors.ts"],"sourcesContent":["const errorPrefix = 'ClerkJS:';\n\n/**\n *\n */\nexport function clerkErrorPathRouterMissingPath(componentName: string): never {\n throw new Error(\n `${errorPrefix} Missing path option. The ${componentName} component was mounted with path routing so you need to specify the path where the component is mounted on e.g. path=\"/sign-in\".`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidRoutingStrategy(strategy?: string): never {\n throw new Error(`${errorPrefix} Invalid routing strategy, path cannot be used in tandem with ${strategy}.`);\n}\n\n/**\n *\n */\nexport function clerkCoreErrorNoClerkSingleton(): never {\n throw new Error(\n `${errorPrefix} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`,\n );\n}\n\n/**\n *\n */\nexport function clerkCoreErrorContextProviderNotFound(providerName: string): never {\n throw new Error(`${errorPrefix} ${providerName} not found. Make sure you wrap your app with <${providerName}>.`);\n}\n\n/**\n *\n */\nexport function clerkUIErrorDOMElementNotFound(): never {\n throw new Error(`${errorPrefix} The target element is empty. Provide a valid DOM element.`);\n}\n\n/**\n * Used to log a warning when a Clerk feature is used in an unsupported environment.\n * (Development Only)\n * This is a warning and not an error because the application will still work, but the feature will not be available.\n *\n * @param strategy - The strategy that is not supported in the current environment.\n * @returns void\n */\nexport function clerkUnsupportedEnvironmentWarning(strategy: string) {\n console.warn(`${errorPrefix} ${strategy} is not supported in this environment.`);\n}\n\n/**\n *\n */\nexport function clerkNetworkError(url: string, e: Error): never {\n throw new Error(`${errorPrefix} Network error at \"${url}\" - ${e}. Please try again.`);\n}\n\n/**\n *\n */\nexport function clerkErrorInitFailed(): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk.`);\n}\n\n/**\n *\n */\nexport function clerkErrorDevInitFailed(msg = ''): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk in development mode.${msg && ` ${msg}`}`);\n}\n\n/**\n *\n */\nexport function clerkMissingFapiClientInResources(): never {\n throw new Error(`${errorPrefix} Missing FAPI client in resources.`);\n}\n\n/**\n *\n */\nexport function clerkOAuthCallbackDidNotCompleteSignInSignUp(type: 'sign in' | 'sign up'): never {\n throw new Error(\n `${errorPrefix} Something went wrong initializing Clerk during the ${type} flow. Please contact support.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create() first.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidStrategy(functionaName: string, strategy: string): never {\n throw new Error(`${errorPrefix} Strategy \"${strategy}\" is not a valid strategy for ${functionaName}.`);\n}\n\n/**\n *\n */\nexport function clerkVerifyWeb3WalletCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(\n `${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyPasskeyCalledBeforeCreate(): never {\n throw new Error(\n `${errorPrefix} You need to start a SignIn flow by calling SignIn.create({ strategy: 'passkey' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingOptionError(name = ''): never {\n throw new Error(`${errorPrefix} Missing '${name}' option`);\n}\n\n/**\n *\n */\nexport function clerkInvalidFAPIResponse(status: string | null, supportEmail: string): never {\n throw new Error(\n `${errorPrefix} Response: ${status || 0} not supported yet.\\nFor more information contact us at ${supportEmail}`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingDevBrowser(): never {\n throw new Error(`${errorPrefix} Missing dev browser. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingProxyUrlAndDomain(): never {\n throw new Error(\n `${errorPrefix} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlOrigin(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to be on a different origin than your satellite application.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlFormat(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to have a absolute url format.`);\n}\n\n/**\n *\n */\nexport function clerkMissingSignInUrlAsSatellite(): never {\n throw new Error(\n `${errorPrefix} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`,\n );\n}\n\n/**\n *\n */\nexport function clerkRedirectUrlIsMissingScheme(): never {\n throw new Error(`${errorPrefix} Invalid redirect_url. A valid http or https url should be used for the redirection.`);\n}\n\n/**\n *\n */\nexport function clerkFailedToLoadThirdPartyScript(name?: string): never {\n throw new Error(`${errorPrefix} Unable to retrieve a third party script${name ? ` ${name}` : ''}.`);\n}\n\n/**\n *\n */\nexport function clerkUnsupportedReloadMethod(className: string): never {\n throw new Error(`${errorPrefix} Calling ${className}.reload is not currently supported. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never {\n throw new Error(\n `${errorPrefix} Missing publicKey. When calling 'navigator.credentials.${name}()' it is required to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3,"file":"errors.js","names":[],"sources":["../../../src/internal/clerk-js/errors.ts"],"sourcesContent":["const errorPrefix = 'ClerkJS:';\n\n/**\n *\n */\nexport function clerkErrorPathRouterMissingPath(componentName: string): never {\n throw new Error(\n `${errorPrefix} Missing path option. The ${componentName} component was mounted with path routing so you need to specify the path where the component is mounted on e.g. path=\"/sign-in\".`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidRoutingStrategy(strategy?: string): never {\n throw new Error(`${errorPrefix} Invalid routing strategy, path cannot be used in tandem with ${strategy}.`);\n}\n\n/**\n *\n */\nexport function clerkCoreErrorNoClerkSingleton(): never {\n throw new Error(\n `${errorPrefix} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`,\n );\n}\n\n/**\n *\n */\nexport function clerkCoreErrorContextProviderNotFound(providerName: string): never {\n throw new Error(`${errorPrefix} ${providerName} not found. Make sure you wrap your app with <${providerName}>.`);\n}\n\n/**\n *\n */\nexport function clerkUIErrorDOMElementNotFound(): never {\n throw new Error(`${errorPrefix} The target element is empty. Provide a valid DOM element.`);\n}\n\n/**\n * Used to log a warning when a Clerk feature is used in an unsupported environment.\n * (Development Only)\n * This is a warning and not an error because the application will still work, but the feature will not be available.\n *\n * @param strategy - The strategy that is not supported in the current environment.\n * @returns void\n */\nexport function clerkUnsupportedEnvironmentWarning(strategy: string) {\n console.warn(`${errorPrefix} ${strategy} is not supported in this environment.`);\n}\n\n/**\n *\n */\nexport function clerkNetworkError(url: string, e: Error): never {\n throw new Error(`${errorPrefix} Network error at \"${url}\" - ${e}. Please try again.`);\n}\n\n/**\n *\n */\nexport function clerkErrorInitFailed(): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk.`);\n}\n\n/**\n *\n */\nexport function clerkErrorDevInitFailed(msg = ''): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk in development mode.${msg && ` ${msg}`}`);\n}\n\n/**\n *\n */\nexport function clerkMissingFapiClientInResources(): never {\n throw new Error(`${errorPrefix} Missing FAPI client in resources.`);\n}\n\n/**\n *\n */\nexport function clerkOAuthCallbackDidNotCompleteSignInSignUp(type: 'sign in' | 'sign up'): never {\n throw new Error(\n `${errorPrefix} Something went wrong initializing Clerk during the ${type} flow. Please contact support.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create() first.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidStrategy(functionaName: string, strategy: string): never {\n throw new Error(`${errorPrefix} Strategy \"${strategy}\" is not a valid strategy for ${functionaName}.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidVerificationLevel(functionName: string, level: string): never {\n throw new Error(\n `${errorPrefix} \"${level}\" is not a valid verification level for ${functionName}. Use 'first_factor' or 'second_factor'.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyWeb3WalletCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(\n `${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyPasskeyCalledBeforeCreate(): never {\n throw new Error(\n `${errorPrefix} You need to start a SignIn flow by calling SignIn.create({ strategy: 'passkey' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingOptionError(name = ''): never {\n throw new Error(`${errorPrefix} Missing '${name}' option`);\n}\n\n/**\n *\n */\nexport function clerkInvalidFAPIResponse(status: string | null, supportEmail: string): never {\n throw new Error(\n `${errorPrefix} Response: ${status || 0} not supported yet.\\nFor more information contact us at ${supportEmail}`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingDevBrowser(): never {\n throw new Error(`${errorPrefix} Missing dev browser. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingProxyUrlAndDomain(): never {\n throw new Error(\n `${errorPrefix} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlOrigin(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to be on a different origin than your satellite application.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlFormat(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to have a absolute url format.`);\n}\n\n/**\n *\n */\nexport function clerkMissingSignInUrlAsSatellite(): never {\n throw new Error(\n `${errorPrefix} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`,\n );\n}\n\n/**\n *\n */\nexport function clerkRedirectUrlIsMissingScheme(): never {\n throw new Error(`${errorPrefix} Invalid redirect_url. A valid http or https url should be used for the redirection.`);\n}\n\n/**\n *\n */\nexport function clerkFailedToLoadThirdPartyScript(name?: string): never {\n throw new Error(`${errorPrefix} Unable to retrieve a third party script${name ? ` ${name}` : ''}.`);\n}\n\n/**\n *\n */\nexport function clerkUnsupportedReloadMethod(className: string): never {\n throw new Error(`${errorPrefix} Calling ${className}.reload is not currently supported. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never {\n throw new Error(\n `${errorPrefix} Missing publicKey. When calling 'navigator.credentials.${name}()' it is required to pass a publicKey object.`,\n );\n}\n"],"mappings":";;;AAAA,MAAM,cAAc;;;;AAKpB,SAAgB,gCAAgC,eAA8B;CAC5E,MAAM,IAAI,MACR,GAAG,YAAY,4BAA4B,cAAc,iIAC3D;AACF;;;;AAKA,SAAgB,4BAA4B,UAA0B;CACpE,MAAM,IAAI,MAAM,GAAG,YAAY,gEAAgE,SAAS,EAAE;AAC5G;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MACR,GAAG,YAAY,6FACjB;AACF;;;;AAKA,SAAgB,sCAAsC,cAA6B;CACjF,MAAM,IAAI,MAAM,GAAG,YAAY,GAAG,aAAa,gDAAgD,aAAa,GAAG;AACjH;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MAAM,GAAG,YAAY,2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AuB,cAA6B;CAC3F,MAAM,IAAI,MACR,GAAG,YAAY,aAAa,UAAU,EAAE,0DAA0D,cACpG;AACF;;;;AAKA,SAAgB,yBAAgC;CAC9C,MAAM,IAAI,MAAM,GAAG,YAAY,8CAA8C;AAC/E;;;;AAKA,SAAgB,gCAAuC;CACrD,MAAM,IAAI,MACR,GAAG,YAAY,+FACjB;AACF;;;;AAKA,SAAgB,8BAAqC;CACnD,MAAM,IAAI,MAAM,GAAG,YAAY,kFAAkF;AACnH;;;;AAKA,SAAgB,8BAAqC;CACnD,MAAM,IAAI,MAAM,GAAG,YAAY,oDAAoD;AACrF;;;;AAKA,SAAgB,mCAA0C;CACxD,MAAM,IAAI,MACR,GAAG,YAAY,sGACjB;AACF;;;;AAKA,SAAgB,kCAAyC;CACvD,MAAM,IAAI,MAAM,GAAG,YAAY,qFAAqF;AACtH;;;;AAKA,SAAgB,kCAAkC,MAAsB;CACtE,MAAM,IAAI,MAAM,GAAG,YAAY,0CAA0C,OAAO,IAAI,SAAS,GAAG,EAAE;AACpG;;;;AAKA,SAAgB,6BAA6B,WAA0B;CACrE,MAAM,IAAI,MAAM,GAAG,YAAY,WAAW,UAAU,4DAA4D;AAClH;;;;AAKA,SAAgB,qCAAqC,MAA+B;CAClF,MAAM,IAAI,MACR,GAAG,YAAY,0DAA0D,KAAK,+CAChF;AACF"}
|
|
@@ -86,6 +86,12 @@ function clerkInvalidStrategy(functionaName, strategy) {
|
|
|
86
86
|
/**
|
|
87
87
|
*
|
|
88
88
|
*/
|
|
89
|
+
function clerkInvalidVerificationLevel(functionName, level) {
|
|
90
|
+
throw new Error(`${errorPrefix} "${level}" is not a valid verification level for ${functionName}. Use 'first_factor' or 'second_factor'.`);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
89
95
|
function clerkVerifyWeb3WalletCalledBeforeCreate(type) {
|
|
90
96
|
throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`);
|
|
91
97
|
}
|
|
@@ -163,5 +169,5 @@ function clerkMissingWebAuthnPublicKeyOptions(name) {
|
|
|
163
169
|
}
|
|
164
170
|
|
|
165
171
|
//#endregion
|
|
166
|
-
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
172
|
+
export { clerkCoreErrorContextProviderNotFound, clerkCoreErrorNoClerkSingleton, clerkErrorDevInitFailed, clerkErrorInitFailed, clerkErrorPathRouterMissingPath, clerkFailedToLoadThirdPartyScript, clerkInvalidFAPIResponse, clerkInvalidRoutingStrategy, clerkInvalidSignInUrlFormat, clerkInvalidSignInUrlOrigin, clerkInvalidStrategy, clerkInvalidVerificationLevel, clerkMissingDevBrowser, clerkMissingFapiClientInResources, clerkMissingOptionError, clerkMissingProxyUrlAndDomain, clerkMissingSignInUrlAsSatellite, clerkMissingWebAuthnPublicKeyOptions, clerkNetworkError, clerkOAuthCallbackDidNotCompleteSignInSignUp, clerkRedirectUrlIsMissingScheme, clerkUIErrorDOMElementNotFound, clerkUnsupportedEnvironmentWarning, clerkUnsupportedReloadMethod, clerkVerifyEmailAddressCalledBeforeCreate, clerkVerifyPasskeyCalledBeforeCreate, clerkVerifyWeb3WalletCalledBeforeCreate };
|
|
167
173
|
//# sourceMappingURL=errors.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/internal/clerk-js/errors.ts"],"sourcesContent":["const errorPrefix = 'ClerkJS:';\n\n/**\n *\n */\nexport function clerkErrorPathRouterMissingPath(componentName: string): never {\n throw new Error(\n `${errorPrefix} Missing path option. The ${componentName} component was mounted with path routing so you need to specify the path where the component is mounted on e.g. path=\"/sign-in\".`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidRoutingStrategy(strategy?: string): never {\n throw new Error(`${errorPrefix} Invalid routing strategy, path cannot be used in tandem with ${strategy}.`);\n}\n\n/**\n *\n */\nexport function clerkCoreErrorNoClerkSingleton(): never {\n throw new Error(\n `${errorPrefix} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`,\n );\n}\n\n/**\n *\n */\nexport function clerkCoreErrorContextProviderNotFound(providerName: string): never {\n throw new Error(`${errorPrefix} ${providerName} not found. Make sure you wrap your app with <${providerName}>.`);\n}\n\n/**\n *\n */\nexport function clerkUIErrorDOMElementNotFound(): never {\n throw new Error(`${errorPrefix} The target element is empty. Provide a valid DOM element.`);\n}\n\n/**\n * Used to log a warning when a Clerk feature is used in an unsupported environment.\n * (Development Only)\n * This is a warning and not an error because the application will still work, but the feature will not be available.\n *\n * @param strategy - The strategy that is not supported in the current environment.\n * @returns void\n */\nexport function clerkUnsupportedEnvironmentWarning(strategy: string) {\n console.warn(`${errorPrefix} ${strategy} is not supported in this environment.`);\n}\n\n/**\n *\n */\nexport function clerkNetworkError(url: string, e: Error): never {\n throw new Error(`${errorPrefix} Network error at \"${url}\" - ${e}. Please try again.`);\n}\n\n/**\n *\n */\nexport function clerkErrorInitFailed(): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk.`);\n}\n\n/**\n *\n */\nexport function clerkErrorDevInitFailed(msg = ''): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk in development mode.${msg && ` ${msg}`}`);\n}\n\n/**\n *\n */\nexport function clerkMissingFapiClientInResources(): never {\n throw new Error(`${errorPrefix} Missing FAPI client in resources.`);\n}\n\n/**\n *\n */\nexport function clerkOAuthCallbackDidNotCompleteSignInSignUp(type: 'sign in' | 'sign up'): never {\n throw new Error(\n `${errorPrefix} Something went wrong initializing Clerk during the ${type} flow. Please contact support.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create() first.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidStrategy(functionaName: string, strategy: string): never {\n throw new Error(`${errorPrefix} Strategy \"${strategy}\" is not a valid strategy for ${functionaName}.`);\n}\n\n/**\n *\n */\nexport function clerkVerifyWeb3WalletCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(\n `${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyPasskeyCalledBeforeCreate(): never {\n throw new Error(\n `${errorPrefix} You need to start a SignIn flow by calling SignIn.create({ strategy: 'passkey' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingOptionError(name = ''): never {\n throw new Error(`${errorPrefix} Missing '${name}' option`);\n}\n\n/**\n *\n */\nexport function clerkInvalidFAPIResponse(status: string | null, supportEmail: string): never {\n throw new Error(\n `${errorPrefix} Response: ${status || 0} not supported yet.\\nFor more information contact us at ${supportEmail}`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingDevBrowser(): never {\n throw new Error(`${errorPrefix} Missing dev browser. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingProxyUrlAndDomain(): never {\n throw new Error(\n `${errorPrefix} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlOrigin(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to be on a different origin than your satellite application.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlFormat(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to have a absolute url format.`);\n}\n\n/**\n *\n */\nexport function clerkMissingSignInUrlAsSatellite(): never {\n throw new Error(\n `${errorPrefix} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`,\n );\n}\n\n/**\n *\n */\nexport function clerkRedirectUrlIsMissingScheme(): never {\n throw new Error(`${errorPrefix} Invalid redirect_url. A valid http or https url should be used for the redirection.`);\n}\n\n/**\n *\n */\nexport function clerkFailedToLoadThirdPartyScript(name?: string): never {\n throw new Error(`${errorPrefix} Unable to retrieve a third party script${name ? ` ${name}` : ''}.`);\n}\n\n/**\n *\n */\nexport function clerkUnsupportedReloadMethod(className: string): never {\n throw new Error(`${errorPrefix} Calling ${className}.reload is not currently supported. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never {\n throw new Error(\n `${errorPrefix} Missing publicKey. When calling 'navigator.credentials.${name}()' it is required to pass a publicKey object.`,\n );\n}\n"],"mappings":";AAAA,MAAM,cAAc;;;;AAKpB,SAAgB,gCAAgC,eAA8B;CAC5E,MAAM,IAAI,MACR,GAAG,YAAY,4BAA4B,cAAc,iIAC3D;AACF;;;;AAKA,SAAgB,4BAA4B,UAA0B;CACpE,MAAM,IAAI,MAAM,GAAG,YAAY,gEAAgE,SAAS,EAAE;AAC5G;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MACR,GAAG,YAAY,6FACjB;AACF;;;;AAKA,SAAgB,sCAAsC,cAA6B;CACjF,MAAM,IAAI,MAAM,GAAG,YAAY,GAAG,aAAa,gDAAgD,aAAa,GAAG;AACjH;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MAAM,GAAG,YAAY,2DAA2D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AAM,IAAI,MAAM,GAAG,YAAY,8CAA8C;AAC/E;;;;AAKA,SAAgB,gCAAuC;CACrD,MAAM,IAAI,MACR,GAAG,YAAY,+FACjB;AACF;;;;AAKA,SAAgB,8BAAqC;CACnD,MAAM,IAAI,MAAM,GAAG,YAAY,kFAAkF;AACnH;;;;AAKA,SAAgB,8BAAqC;CACnD,MAAM,IAAI,MAAM,GAAG,YAAY,oDAAoD;AACrF;;;;AAKA,SAAgB,mCAA0C;CACxD,MAAM,IAAI,MACR,GAAG,YAAY,sGACjB;AACF;;;;AAKA,SAAgB,kCAAyC;CACvD,MAAM,IAAI,MAAM,GAAG,YAAY,qFAAqF;AACtH;;;;AAKA,SAAgB,kCAAkC,MAAsB;CACtE,MAAM,IAAI,MAAM,GAAG,YAAY,0CAA0C,OAAO,IAAI,SAAS,GAAG,EAAE;AACpG;;;;AAKA,SAAgB,6BAA6B,WAA0B;CACrE,MAAM,IAAI,MAAM,GAAG,YAAY,WAAW,UAAU,4DAA4D;AAClH;;;;AAKA,SAAgB,qCAAqC,MAA+B;CAClF,MAAM,IAAI,MACR,GAAG,YAAY,0DAA0D,KAAK,+CAChF;AACF"}
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/internal/clerk-js/errors.ts"],"sourcesContent":["const errorPrefix = 'ClerkJS:';\n\n/**\n *\n */\nexport function clerkErrorPathRouterMissingPath(componentName: string): never {\n throw new Error(\n `${errorPrefix} Missing path option. The ${componentName} component was mounted with path routing so you need to specify the path where the component is mounted on e.g. path=\"/sign-in\".`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidRoutingStrategy(strategy?: string): never {\n throw new Error(`${errorPrefix} Invalid routing strategy, path cannot be used in tandem with ${strategy}.`);\n}\n\n/**\n *\n */\nexport function clerkCoreErrorNoClerkSingleton(): never {\n throw new Error(\n `${errorPrefix} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`,\n );\n}\n\n/**\n *\n */\nexport function clerkCoreErrorContextProviderNotFound(providerName: string): never {\n throw new Error(`${errorPrefix} ${providerName} not found. Make sure you wrap your app with <${providerName}>.`);\n}\n\n/**\n *\n */\nexport function clerkUIErrorDOMElementNotFound(): never {\n throw new Error(`${errorPrefix} The target element is empty. Provide a valid DOM element.`);\n}\n\n/**\n * Used to log a warning when a Clerk feature is used in an unsupported environment.\n * (Development Only)\n * This is a warning and not an error because the application will still work, but the feature will not be available.\n *\n * @param strategy - The strategy that is not supported in the current environment.\n * @returns void\n */\nexport function clerkUnsupportedEnvironmentWarning(strategy: string) {\n console.warn(`${errorPrefix} ${strategy} is not supported in this environment.`);\n}\n\n/**\n *\n */\nexport function clerkNetworkError(url: string, e: Error): never {\n throw new Error(`${errorPrefix} Network error at \"${url}\" - ${e}. Please try again.`);\n}\n\n/**\n *\n */\nexport function clerkErrorInitFailed(): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk.`);\n}\n\n/**\n *\n */\nexport function clerkErrorDevInitFailed(msg = ''): never {\n throw new Error(`${errorPrefix} Something went wrong initializing Clerk in development mode.${msg && ` ${msg}`}`);\n}\n\n/**\n *\n */\nexport function clerkMissingFapiClientInResources(): never {\n throw new Error(`${errorPrefix} Missing FAPI client in resources.`);\n}\n\n/**\n *\n */\nexport function clerkOAuthCallbackDidNotCompleteSignInSignUp(type: 'sign in' | 'sign up'): never {\n throw new Error(\n `${errorPrefix} Something went wrong initializing Clerk during the ${type} flow. Please contact support.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyEmailAddressCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(`${errorPrefix} You need to start a ${type} flow by calling ${type}.create() first.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidStrategy(functionaName: string, strategy: string): never {\n throw new Error(`${errorPrefix} Strategy \"${strategy}\" is not a valid strategy for ${functionaName}.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidVerificationLevel(functionName: string, level: string): never {\n throw new Error(\n `${errorPrefix} \"${level}\" is not a valid verification level for ${functionName}. Use 'first_factor' or 'second_factor'.`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyWeb3WalletCalledBeforeCreate(type: 'SignIn' | 'SignUp'): never {\n throw new Error(\n `${errorPrefix} You need to start a ${type} flow by calling ${type}.create({ identifier: 'your web3 wallet address' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkVerifyPasskeyCalledBeforeCreate(): never {\n throw new Error(\n `${errorPrefix} You need to start a SignIn flow by calling SignIn.create({ strategy: 'passkey' }) first`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingOptionError(name = ''): never {\n throw new Error(`${errorPrefix} Missing '${name}' option`);\n}\n\n/**\n *\n */\nexport function clerkInvalidFAPIResponse(status: string | null, supportEmail: string): never {\n throw new Error(\n `${errorPrefix} Response: ${status || 0} not supported yet.\\nFor more information contact us at ${supportEmail}`,\n );\n}\n\n/**\n *\n */\nexport function clerkMissingDevBrowser(): never {\n throw new Error(`${errorPrefix} Missing dev browser. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingProxyUrlAndDomain(): never {\n throw new Error(\n `${errorPrefix} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`,\n );\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlOrigin(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to be on a different origin than your satellite application.`);\n}\n\n/**\n *\n */\nexport function clerkInvalidSignInUrlFormat(): never {\n throw new Error(`${errorPrefix} The signInUrl needs to have a absolute url format.`);\n}\n\n/**\n *\n */\nexport function clerkMissingSignInUrlAsSatellite(): never {\n throw new Error(\n `${errorPrefix} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`,\n );\n}\n\n/**\n *\n */\nexport function clerkRedirectUrlIsMissingScheme(): never {\n throw new Error(`${errorPrefix} Invalid redirect_url. A valid http or https url should be used for the redirection.`);\n}\n\n/**\n *\n */\nexport function clerkFailedToLoadThirdPartyScript(name?: string): never {\n throw new Error(`${errorPrefix} Unable to retrieve a third party script${name ? ` ${name}` : ''}.`);\n}\n\n/**\n *\n */\nexport function clerkUnsupportedReloadMethod(className: string): never {\n throw new Error(`${errorPrefix} Calling ${className}.reload is not currently supported. Please contact support.`);\n}\n\n/**\n *\n */\nexport function clerkMissingWebAuthnPublicKeyOptions(name: 'create' | 'get'): never {\n throw new Error(\n `${errorPrefix} Missing publicKey. When calling 'navigator.credentials.${name}()' it is required to pass a publicKey object.`,\n );\n}\n"],"mappings":";AAAA,MAAM,cAAc;;;;AAKpB,SAAgB,gCAAgC,eAA8B;CAC5E,MAAM,IAAI,MACR,GAAG,YAAY,4BAA4B,cAAc,iIAC3D;AACF;;;;AAKA,SAAgB,4BAA4B,UAA0B;CACpE,MAAM,IAAI,MAAM,GAAG,YAAY,gEAAgE,SAAS,EAAE;AAC5G;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MACR,GAAG,YAAY,6FACjB;AACF;;;;AAKA,SAAgB,sCAAsC,cAA6B;CACjF,MAAM,IAAI,MAAM,GAAG,YAAY,GAAG,aAAa,gDAAgD,aAAa,GAAG;AACjH;;;;AAKA,SAAgB,iCAAwC;CACtD,MAAM,IAAI,MAAM,GAAG,YAAY,2DAA2D;AAC5F;;;;;;;;;AAUA,SAAgB,mCAAmC,UAAkB;CACnE,QAAQ,KAAK,GAAG,YAAY,GAAG,SAAS,uCAAuC;AACjF;;;;AAKA,SAAgB,kBAAkB,KAAa,GAAiB;CAC9D,MAAM,IAAI,MAAM,GAAG,YAAY,qBAAqB,IAAI,MAAM,EAAE,oBAAoB;AACtF;;;;AAKA,SAAgB,uBAA8B;CAC5C,MAAM,IAAI,MAAM,GAAG,YAAY,0CAA0C;AAC3E;;;;AAKA,SAAgB,wBAAwB,MAAM,IAAW;CACvD,MAAM,IAAI,MAAM,GAAG,YAAY,+DAA+D,OAAO,IAAI,OAAO;AAClH;;;;AAKA,SAAgB,oCAA2C;CACzD,MAAM,IAAI,MAAM,GAAG,YAAY,mCAAmC;AACpE;;;;AAK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M,IAAI,MAAM,GAAG,YAAY,qFAAqF;AACtH;;;;AAKA,SAAgB,kCAAkC,MAAsB;CACtE,MAAM,IAAI,MAAM,GAAG,YAAY,0CAA0C,OAAO,IAAI,SAAS,GAAG,EAAE;AACpG;;;;AAKA,SAAgB,6BAA6B,WAA0B;CACrE,MAAM,IAAI,MAAM,GAAG,YAAY,WAAW,UAAU,4DAA4D;AAClH;;;;AAKA,SAAgB,qCAAqC,MAA+B;CAClF,MAAM,IAAI,MACR,GAAG,YAAY,0DAA0D,KAAK,+CAChF;AACF"}
|
|
@@ -140,7 +140,7 @@ const clerkJSScriptUrl = (opts) => {
|
|
|
140
140
|
const clerkUIScriptUrl = (opts) => {
|
|
141
141
|
const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;
|
|
142
142
|
if (__internal_clerkUIUrl) return __internal_clerkUIUrl;
|
|
143
|
-
const version = require_versionSelector.versionSelector(__internal_clerkUIVersion, "1.
|
|
143
|
+
const version = require_versionSelector.versionSelector(__internal_clerkUIVersion, "1.41.0");
|
|
144
144
|
if (proxyUrl && require_proxy.isProxyUrlRelative(proxyUrl)) return buildRelativeProxyScriptUrl(proxyUrl, "ui", version, "ui.browser.js");
|
|
145
145
|
return `https://${buildScriptHost({
|
|
146
146
|
publishableKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript.js","names":["createDevOrStagingUrlCache","buildErrorThrower","ClerkRuntimeError","versionSelector","isProxyUrlRelative","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix"],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;;AAQA,MAAM,EAAE,sBAAsBA,wCAA2B;AAEzD,MAAM,eAAeC,gCAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OACpD,OAAO;CAKT,OAAO,CAAC,CADK,OAAe;AAE9B;AACA,MAAM,8BAA8B,4BAA4B,OAAO;AACvE,MAAM,gCAAgC,4BAA4B,wBAAwB;;;;;;;AAQ1F,SAAS,sBAAsB,WAA4B;CACzD,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,aAC3C,OAAO;CAGT,MAAM,UAAU,YAAY,iBAAiB,WAAW,UAAU;CAElE,IAAI,QAAQ,WAAW,GACrB,OAAO;CAGT,MAAM,cAAc,QAAQ,QAAQ,SAAS;CAI7C,IAAI,YAAY,iBAAiB,KAAK,YAAY,oBAAoB,GAAG;EAEvE,IAAI,YAAY,gBAAgB,GAC9B,OAAO;EAGT,IAAI,YAAY,cAAc,KAAK,YAAY,gBAAgB,GAC7D,OAAO;EAGT,IAAI,oBAAoB,aAAa;GAEnC,IADgB,YAAoB,kBACtB,KACZ,OAAO;GAET,IAAI,YAAY,mBAA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,QAAQ,WAAW,YAAY;IAC/B,QAAQ,IAAI;GACd;EACF;EAEA,MAAM,sBAAsB;GAC1B,IAAI,UACF;GAGF,WAAW;GACX,QAAQ,WAAW,YAAY;GAE/B,IAAI,CAAC,UAAU,GACb,OAAO,UAAU;QAEjB,QAAQ,IAAI;EAEhB;EAEA,MAAM,YAAY,WAAW,eAAe,SAAS;EAErD,gBAAgB;EAEhB,MAAM,eAAe,kBAAkB;GACrC,IAAI,UAAU;IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript.js","names":["createDevOrStagingUrlCache","buildErrorThrower","ClerkRuntimeError","versionSelector","isProxyUrlRelative","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix"],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;;AAQA,MAAM,EAAE,sBAAsBA,wCAA2B;AAEzD,MAAM,eAAeC,gCAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OACpD,OAAO;CAKT,OAAO,CAAC,CADK,OAAe;AAE9B;AACA,MAAM,8BAA8B,4BAA4B,OAAO;AACvE,MAAM,gCAAgC,4BAA4B,wBAAwB;;;;;;;AAQ1F,SAAS,sBAAsB,WAA4B;CACzD,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,aAC3C,OAAO;CAGT,MAAM,UAAU,YAAY,iBAAiB,WAAW,UAAU;CAElE,IAAI,QAAQ,WAAW,GACrB,OAAO;CAGT,MAAM,cAAc,QAAQ,QAAQ,SAAS;CAI7C,IAAI,YAAY,iBAAiB,KAAK,YAAY,oBAAoB,GAAG;EAEvE,IAAI,YAAY,gBAAgB,GAC9B,OAAO;EAGT,IAAI,YAAY,cAAc,KAAK,YAAY,gBAAgB,GAC7D,OAAO;EAGT,IAAI,oBAAoB,aAAa;GAEnC,IADgB,YAAoB,kBACtB,KACZ,OAAO;GAET,IAAI,YAAY,mBAAmB,GACjC,OAAO;EAEX;CACF;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,oBAAoB,OAAO,SAAuE;CAC7G,MAAM,UAAU,MAAM,qBAAqB;CAC3C,MAAM,cAAc,UAClB,IAAIC,4CAAkB,6BAA6B,OAAO,UAAU,KAAK,MAAM,YAAY,KAAK;EAC9F,MAAM;EACN,OAAO;CACT,CAAC;CAEH,IAAI,sBAAsB,GACxB,OAAO;C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IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
|
|
@@ -139,7 +139,7 @@ const clerkJSScriptUrl = (opts) => {
|
|
|
139
139
|
const clerkUIScriptUrl = (opts) => {
|
|
140
140
|
const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;
|
|
141
141
|
if (__internal_clerkUIUrl) return __internal_clerkUIUrl;
|
|
142
|
-
const version = versionSelector(__internal_clerkUIVersion, "1.
|
|
142
|
+
const version = versionSelector(__internal_clerkUIVersion, "1.41.0");
|
|
143
143
|
if (proxyUrl && isProxyUrlRelative(proxyUrl)) return buildRelativeProxyScriptUrl(proxyUrl, "ui", version, "ui.browser.js");
|
|
144
144
|
return `https://${buildScriptHost({
|
|
145
145
|
publishableKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript.mjs","names":[],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;AAQA,MAAM,EAAE,sBAAsB,2BAA2B;AAEzD,MAAM,eAAe,kBAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OACpD,OAAO;CAKT,OAAO,CAAC,CADK,OAAe;AAE9B;AACA,MAAM,8BAA8B,4BAA4B,OAAO;AACvE,MAAM,gCAAgC,4BAA4B,wBAAwB;;;;;;;AAQ1F,SAAS,sBAAsB,WAA4B;CACzD,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,aAC3C,OAAO;CAGT,MAAM,UAAU,YAAY,iBAAiB,WAAW,UAAU;CAElE,IAAI,QAAQ,WAAW,GACrB,OAAO;CAGT,MAAM,cAAc,QAAQ,QAAQ,SAAS;CAI7C,IAAI,YAAY,iBAAiB,KAAK,YAAY,oBAAoB,GAAG;EAEvE,IAAI,YAAY,gBAAgB,GAC9B,OAAO;EAGT,IAAI,YAAY,cAAc,KAAK,YAAY,gBAAgB,GAC7D,OAAO;EAGT,IAAI,oBAAoB,aAAa;GAEnC,IADgB,YAAoB,kBACtB,KACZ,OAAO;GAET,IAAI,YAAY,mBAAmB,GACjC,OAAO;EAEX;CACF;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,oBAAoB,OAAO,SAAuE;CAC7G,MAAM,UAAU,MAAM,qBAAqB;CAC3C,MAAM,cAAc,UAClB,IAAI,kBAAkB,6BAA6B,OAAO,UAAU,KAAK,MAAM,YAAY,KAAK;EAC9F,MAAM;E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AM,eAAe,kBAAkB;GACrC,IAAI,UAAU;IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript.mjs","names":[],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;AAQA,MAAM,EAAE,sBAAsB,2BAA2B;AAEzD,MAAM,eAAe,kBAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OAC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CAAC,EAAE,eAAe;EAG7D,OAAO,iBAAiB,QAAQ,iBAAiB,EAAE;CACrD,OAAO,IAAI,UAAU,CAAC,kBAAkB,oBAAoB,cAAc,CAAC,EAAE,eAAe,EAAE,GAC5F,OAAO,eAAe,MAAM;MAE5B,OAAO,oBAAoB,cAAc,CAAC,EAAE,eAAe;AAE/D;AAEA,SAAS,4BACP,WACA,WACA,YACA,gBACmC;CACnC,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,IAAI,WAAW;EAEf,MAAM,WAAW,WAA0C,iBAAiD;GAC1G,aAAa,SAAS;GACtB,cAAc,YAAY;EAC5B;EAGA,gBAAgB,iBAAiB,eAAe;GAC9C,QAAQ,WAAW,YAAY;GAC/B,OAAO,UAAU;EACnB,CAAC;EAED,MAAM,wBAAwB;GAC5B,IAAI,UACF;GAGF,IAAI,UAAU,GAAG;IACf,WAAW;IACX,QAAQ,WAAW,YAAY;IAC/B,QAAQ,IAAI;GACd;EACF;EAEA,MAAM,sBAAsB;GAC1B,IAAI,UACF;GAGF,WAAW;GACX,QAAQ,WAAW,YAAY;GAE/B,IAAI,CAAC,UAAU,GACb,OAAO,UAAU;QAEjB,QAAQ,IAAI;EAEhB;EAEA,MAAM,YAAY,WAAW,eAAe,SAAS;EAErD,gBAAgB;EAEhB,MAAM,eAAe,kBAAkB;GACrC,IAAI,UAAU;IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -52,7 +52,7 @@ import { AttemptPhoneNumberVerificationParams, PhoneNumberResource, PhoneNumberV
|
|
|
52
52
|
import { TOTPResource } from "./totp.mjs";
|
|
53
53
|
import { UserOrganizationInvitationResource } from "./userOrganizationInvitation.mjs";
|
|
54
54
|
import { CreateEmailAddressParams, CreateExternalAccountParams, CreatePhoneNumberParams, CreateWeb3WalletParams, GetEnterpriseConnectionsParams, GetOrganizationMemberships, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, RemoveUserPasswordParams, SetProfileImageParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UserResource, VerifyTOTPParams } from "./user.mjs";
|
|
55
|
-
import { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesResource, SignedInSessionResource } from "./session.mjs";
|
|
55
|
+
import { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesResource, SignedInSessionResource } from "./session.mjs";
|
|
56
56
|
import { OrganizationMembershipRequestResource } from "./organizationMembershipRequest.mjs";
|
|
57
57
|
import { AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource } from "./ssoBypassAllowlist.mjs";
|
|
58
58
|
import { AddMemberParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetRolesParams, GetRolesResponse, InviteMemberParams, InviteMembersParams, OrganizationResource, SetOrganizationLogoParams, UpdateMembershipParams, UpdateOrganizationParams } from "./organization.mjs";
|
|
@@ -86,4 +86,4 @@ import { ProtectParams, ShowProps, ShowWhenCondition } from "./authorization.mjs
|
|
|
86
86
|
import { ClerkHostRouter, RoutingMode } from "./router.mjs";
|
|
87
87
|
import { OAUTH_PROVIDERS, SAML_IDPS, WEB3_PROVIDERS, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders } from "./runtime-values.mjs";
|
|
88
88
|
import { InitialState, ServerGetToken, ServerGetTokenOptions } from "./ssr.mjs";
|
|
89
|
-
export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptBiometricCredentialParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BiometricCredentialJSON, BiometricCredentialJSONSnapshot, BiometricCredentialPlatform, BiometricCredentialPublicKeyJWK, BiometricCredentialResource, BiometricCredentialStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncGroupJSON, DirectorySyncGroupResource, DirectorySyncGroupRoleMappingJSON, DirectorySyncGroupRoleMappingResource, DirectorySyncGroupRoleMappingsJSON, DirectorySyncGroupRoleMappingsResource, DirectorySyncGroupsPage, DirectorySyncGroupsPageJSON, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnterpriseSamlIdpCertificateJSON, EnterpriseSamlIdpCertificateResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncGroupsParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NativeSettingsJSON, NativeSettingsResource, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareBiometricCredentialParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ReplaceDirectorySyncGroupRoleMappingsParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TrustedDeviceAlgorithm, TrustedDeviceAttempt, TrustedDeviceChallengeJSON, TrustedDeviceChallengeResource, TrustedDeviceConfig, TrustedDeviceStrategy, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
|
|
89
|
+
export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptBiometricCredentialParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BiometricCredentialJSON, BiometricCredentialJSONSnapshot, BiometricCredentialPlatform, BiometricCredentialPublicKeyJWK, BiometricCredentialResource, BiometricCredentialStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncGroupJSON, DirectorySyncGroupResource, DirectorySyncGroupRoleMappingJSON, DirectorySyncGroupRoleMappingResource, DirectorySyncGroupRoleMappingsJSON, DirectorySyncGroupRoleMappingsResource, DirectorySyncGroupsPage, DirectorySyncGroupsPageJSON, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnterpriseSamlIdpCertificateJSON, EnterpriseSamlIdpCertificateResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncGroupsParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NativeSettingsJSON, NativeSettingsResource, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareBiometricCredentialParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ReplaceDirectorySyncGroupRoleMappingsParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TrustedDeviceAlgorithm, TrustedDeviceAttempt, TrustedDeviceChallengeJSON, TrustedDeviceChallengeResource, TrustedDeviceConfig, TrustedDeviceStrategy, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ import { AttemptPhoneNumberVerificationParams, PhoneNumberResource, PhoneNumberV
|
|
|
52
52
|
import { TOTPResource } from "./totp.js";
|
|
53
53
|
import { UserOrganizationInvitationResource } from "./userOrganizationInvitation.js";
|
|
54
54
|
import { CreateEmailAddressParams, CreateExternalAccountParams, CreatePhoneNumberParams, CreateWeb3WalletParams, GetEnterpriseConnectionsParams, GetOrganizationMemberships, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, RemoveUserPasswordParams, SetProfileImageParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UserResource, VerifyTOTPParams } from "./user.js";
|
|
55
|
-
import { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesResource, SignedInSessionResource } from "./session.js";
|
|
55
|
+
import { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesResource, SignedInSessionResource } from "./session.js";
|
|
56
56
|
import { OrganizationMembershipRequestResource } from "./organizationMembershipRequest.js";
|
|
57
57
|
import { AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource } from "./ssoBypassAllowlist.js";
|
|
58
58
|
import { AddMemberParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetRolesParams, GetRolesResponse, InviteMemberParams, InviteMembersParams, OrganizationResource, SetOrganizationLogoParams, UpdateMembershipParams, UpdateOrganizationParams } from "./organization.js";
|
|
@@ -86,4 +86,4 @@ import { ProtectParams, ShowProps, ShowWhenCondition } from "./authorization.js"
|
|
|
86
86
|
import { ClerkHostRouter, RoutingMode } from "./router.js";
|
|
87
87
|
import { OAUTH_PROVIDERS, SAML_IDPS, WEB3_PROVIDERS, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders } from "./runtime-values.js";
|
|
88
88
|
import { InitialState, ServerGetToken, ServerGetTokenOptions } from "./ssr.js";
|
|
89
|
-
export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptBiometricCredentialParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BiometricCredentialJSON, BiometricCredentialJSONSnapshot, BiometricCredentialPlatform, BiometricCredentialPublicKeyJWK, BiometricCredentialResource, BiometricCredentialStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncGroupJSON, DirectorySyncGroupResource, DirectorySyncGroupRoleMappingJSON, DirectorySyncGroupRoleMappingResource, DirectorySyncGroupRoleMappingsJSON, DirectorySyncGroupRoleMappingsResource, DirectorySyncGroupsPage, DirectorySyncGroupsPageJSON, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnterpriseSamlIdpCertificateJSON, EnterpriseSamlIdpCertificateResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncGroupsParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NativeSettingsJSON, NativeSettingsResource, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareBiometricCredentialParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ReplaceDirectorySyncGroupRoleMappingsParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TrustedDeviceAlgorithm, TrustedDeviceAttempt, TrustedDeviceChallengeJSON, TrustedDeviceChallengeResource, TrustedDeviceConfig, TrustedDeviceStrategy, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
|
|
89
|
+
export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptBiometricCredentialParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BiometricCredentialJSON, BiometricCredentialJSONSnapshot, BiometricCredentialPlatform, BiometricCredentialPublicKeyJWK, BiometricCredentialResource, BiometricCredentialStatus, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncGroupJSON, DirectorySyncGroupResource, DirectorySyncGroupRoleMappingJSON, DirectorySyncGroupRoleMappingResource, DirectorySyncGroupRoleMappingsJSON, DirectorySyncGroupRoleMappingsResource, DirectorySyncGroupsPage, DirectorySyncGroupsPageJSON, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnterpriseSamlIdpCertificateJSON, EnterpriseSamlIdpCertificateResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncGroupsParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NativeSettingsJSON, NativeSettingsResource, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareBiometricCredentialParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ReplaceDirectorySyncGroupRoleMappingsParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TrustedDeviceAlgorithm, TrustedDeviceAttempt, TrustedDeviceChallengeJSON, TrustedDeviceChallengeResource, TrustedDeviceConfig, TrustedDeviceStrategy, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
|
|
@@ -571,6 +571,10 @@ type __internal_LocalizationResource = {
|
|
|
571
571
|
title: LocalizationValue;
|
|
572
572
|
subtitle: LocalizationValue;
|
|
573
573
|
};
|
|
574
|
+
passkeyMfa: {
|
|
575
|
+
title: LocalizationValue;
|
|
576
|
+
subtitle: LocalizationValue;
|
|
577
|
+
};
|
|
574
578
|
alternativeMethods: {
|
|
575
579
|
title: LocalizationValue;
|
|
576
580
|
subtitle: LocalizationValue;
|
|
@@ -665,6 +669,11 @@ type __internal_LocalizationResource = {
|
|
|
665
669
|
subtitle: LocalizationValue;
|
|
666
670
|
blockButton__passkey: LocalizationValue;
|
|
667
671
|
};
|
|
672
|
+
passkeyMfa: {
|
|
673
|
+
title: LocalizationValue;
|
|
674
|
+
subtitle: LocalizationValue;
|
|
675
|
+
blockButton__passkey: LocalizationValue;
|
|
676
|
+
};
|
|
668
677
|
alternativeMethods: {
|
|
669
678
|
title: LocalizationValue;
|
|
670
679
|
subtitle: LocalizationValue;
|
|
@@ -571,6 +571,10 @@ type __internal_LocalizationResource = {
|
|
|
571
571
|
title: LocalizationValue;
|
|
572
572
|
subtitle: LocalizationValue;
|
|
573
573
|
};
|
|
574
|
+
passkeyMfa: {
|
|
575
|
+
title: LocalizationValue;
|
|
576
|
+
subtitle: LocalizationValue;
|
|
577
|
+
};
|
|
574
578
|
alternativeMethods: {
|
|
575
579
|
title: LocalizationValue;
|
|
576
580
|
subtitle: LocalizationValue;
|
|
@@ -665,6 +669,11 @@ type __internal_LocalizationResource = {
|
|
|
665
669
|
subtitle: LocalizationValue;
|
|
666
670
|
blockButton__passkey: LocalizationValue;
|
|
667
671
|
};
|
|
672
|
+
passkeyMfa: {
|
|
673
|
+
title: LocalizationValue;
|
|
674
|
+
subtitle: LocalizationValue;
|
|
675
|
+
blockButton__passkey: LocalizationValue;
|
|
676
|
+
};
|
|
668
677
|
alternativeMethods: {
|
|
669
678
|
title: LocalizationValue;
|
|
670
679
|
subtitle: LocalizationValue;
|
package/dist/types/session.d.mts
CHANGED
|
@@ -296,9 +296,15 @@ interface SessionResource extends ClerkResource {
|
|
|
296
296
|
attemptSecondFactorVerification: (params: SessionVerifyAttemptSecondFactorParams) => Promise<SessionVerificationResource>;
|
|
297
297
|
/**
|
|
298
298
|
* Initiates a verification flow using passkeys.
|
|
299
|
+
*
|
|
300
|
+
* By default the passkey verifies the first factor. Pass
|
|
301
|
+
* `{ level: 'second_factor' }` to satisfy the second factor of an
|
|
302
|
+
* in-progress multi-factor reverification instead. Any other `level`
|
|
303
|
+
* value is rejected. Throws a `ClerkWebAuthnError` when WebAuthn is
|
|
304
|
+
* unsupported or the passkey ceremony fails.
|
|
299
305
|
* @returns A [`SessionVerification`](https://clerk.com/docs/reference/types/session-verification) instance with its status and supported factors.
|
|
300
306
|
*/
|
|
301
|
-
verifyWithPasskey: () => Promise<SessionVerificationResource>;
|
|
307
|
+
verifyWithPasskey: (params?: SessionVerifyWithPasskeyParams) => Promise<SessionVerificationResource>;
|
|
302
308
|
__internal_toSnapshot: () => SessionJSONSnapshot;
|
|
303
309
|
__internal_touch: (params?: SessionTouchParams) => Promise<ClientResource | undefined>;
|
|
304
310
|
}
|
|
@@ -478,16 +484,24 @@ type SessionVerifyAttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt
|
|
|
478
484
|
* @experimental
|
|
479
485
|
*/
|
|
480
486
|
| TrustedDeviceAttempt;
|
|
481
|
-
type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig
|
|
487
|
+
type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig | PassKeyConfig
|
|
482
488
|
/**
|
|
483
489
|
* @experimental
|
|
484
490
|
*/
|
|
485
491
|
| TrustedDeviceConfig;
|
|
486
|
-
type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt
|
|
492
|
+
type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | PasskeyAttempt
|
|
487
493
|
/**
|
|
488
494
|
* @experimental
|
|
489
495
|
*/
|
|
490
496
|
| TrustedDeviceAttempt;
|
|
497
|
+
type SessionVerifyWithPasskeyParams = {
|
|
498
|
+
/**
|
|
499
|
+
* Which factor of the reverification the passkey should verify. Defaults
|
|
500
|
+
* to `'first_factor'`; pass `'second_factor'` to satisfy the second
|
|
501
|
+
* factor of an in-progress multi-factor reverification.
|
|
502
|
+
*/
|
|
503
|
+
level?: 'first_factor' | 'second_factor';
|
|
504
|
+
};
|
|
491
505
|
//#endregion
|
|
492
|
-
export { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesResource, SignedInSessionResource };
|
|
506
|
+
export { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesResource, SignedInSessionResource };
|
|
493
507
|
//# sourceMappingURL=session.d.mts.map
|
package/dist/types/session.d.ts
CHANGED
|
@@ -296,9 +296,15 @@ interface SessionResource extends ClerkResource {
|
|
|
296
296
|
attemptSecondFactorVerification: (params: SessionVerifyAttemptSecondFactorParams) => Promise<SessionVerificationResource>;
|
|
297
297
|
/**
|
|
298
298
|
* Initiates a verification flow using passkeys.
|
|
299
|
+
*
|
|
300
|
+
* By default the passkey verifies the first factor. Pass
|
|
301
|
+
* `{ level: 'second_factor' }` to satisfy the second factor of an
|
|
302
|
+
* in-progress multi-factor reverification instead. Any other `level`
|
|
303
|
+
* value is rejected. Throws a `ClerkWebAuthnError` when WebAuthn is
|
|
304
|
+
* unsupported or the passkey ceremony fails.
|
|
299
305
|
* @returns A [`SessionVerification`](https://clerk.com/docs/reference/types/session-verification) instance with its status and supported factors.
|
|
300
306
|
*/
|
|
301
|
-
verifyWithPasskey: () => Promise<SessionVerificationResource>;
|
|
307
|
+
verifyWithPasskey: (params?: SessionVerifyWithPasskeyParams) => Promise<SessionVerificationResource>;
|
|
302
308
|
__internal_toSnapshot: () => SessionJSONSnapshot;
|
|
303
309
|
__internal_touch: (params?: SessionTouchParams) => Promise<ClientResource | undefined>;
|
|
304
310
|
}
|
|
@@ -478,16 +484,24 @@ type SessionVerifyAttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt
|
|
|
478
484
|
* @experimental
|
|
479
485
|
*/
|
|
480
486
|
| TrustedDeviceAttempt;
|
|
481
|
-
type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig
|
|
487
|
+
type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig | PassKeyConfig
|
|
482
488
|
/**
|
|
483
489
|
* @experimental
|
|
484
490
|
*/
|
|
485
491
|
| TrustedDeviceConfig;
|
|
486
|
-
type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt
|
|
492
|
+
type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | PasskeyAttempt
|
|
487
493
|
/**
|
|
488
494
|
* @experimental
|
|
489
495
|
*/
|
|
490
496
|
| TrustedDeviceAttempt;
|
|
497
|
+
type SessionVerifyWithPasskeyParams = {
|
|
498
|
+
/**
|
|
499
|
+
* Which factor of the reverification the passkey should verify. Defaults
|
|
500
|
+
* to `'first_factor'`; pass `'second_factor'` to satisfy the second
|
|
501
|
+
* factor of an in-progress multi-factor reverification.
|
|
502
|
+
*/
|
|
503
|
+
level?: 'first_factor' | 'second_factor';
|
|
504
|
+
};
|
|
491
505
|
//#endregion
|
|
492
|
-
export { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesResource, SignedInSessionResource };
|
|
506
|
+
export { ActiveSessionResource, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, GetToken, GetTokenOptions, PendingSessionOptions, PendingSessionResource, PublicUserData, SessionActivity, SessionResource, SessionStatus, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionVerifyWithPasskeyParams, SessionWithActivitiesResource, SignedInSessionResource };
|
|
493
507
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -41,7 +41,7 @@ type SessionVerificationFirstFactor = EmailCodeFactor | PhoneCodeFactor | Passwo
|
|
|
41
41
|
* @experimental
|
|
42
42
|
*/
|
|
43
43
|
| EnterpriseSSOFactor;
|
|
44
|
-
type SessionVerificationSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor;
|
|
44
|
+
type SessionVerificationSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | PasskeyFactor;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { ReverificationConfig, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes };
|
|
47
47
|
//# sourceMappingURL=sessionVerification.d.mts.map
|
|
@@ -41,7 +41,7 @@ type SessionVerificationFirstFactor = EmailCodeFactor | PhoneCodeFactor | Passwo
|
|
|
41
41
|
* @experimental
|
|
42
42
|
*/
|
|
43
43
|
| EnterpriseSSOFactor;
|
|
44
|
-
type SessionVerificationSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor;
|
|
44
|
+
type SessionVerificationSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | PasskeyFactor;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { ReverificationConfig, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes };
|
|
47
47
|
//# sourceMappingURL=sessionVerification.d.ts.map
|
|
@@ -7,7 +7,7 @@ import { EmailAddressIdentifier, PhoneNumberIdentifier, UsernameIdentifier, Web3
|
|
|
7
7
|
type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'needs_client_trust' | 'needs_new_password' | 'needs_protect_check' | 'complete';
|
|
8
8
|
type SignInIdentifier = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | Web3WalletIdentifier;
|
|
9
9
|
type SignInFirstFactor = EmailCodeFactor | EmailLinkFactor | PhoneCodeFactor | PasswordFactor | PasskeyFactor | ResetPasswordPhoneCodeFactor | ResetPasswordEmailCodeFactor | Web3SignatureFactor | OauthFactor | EnterpriseSSOFactor;
|
|
10
|
-
type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | EmailCodeFactor | EmailLinkFactor;
|
|
10
|
+
type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | EmailCodeFactor | EmailLinkFactor | PasskeyFactor;
|
|
11
11
|
interface UserData {
|
|
12
12
|
firstName?: string;
|
|
13
13
|
lastName?: string;
|
|
@@ -17,8 +17,8 @@ interface UserData {
|
|
|
17
17
|
type SignInFactor = SignInFirstFactor | SignInSecondFactor;
|
|
18
18
|
type PrepareFirstFactorParams = EmailCodeConfig | EmailLinkConfig | PhoneCodeConfig | Web3SignatureConfig | PassKeyConfig | ResetPasswordPhoneCodeFactorConfig | ResetPasswordEmailCodeFactorConfig | OAuthConfig | EnterpriseSSOConfig;
|
|
19
19
|
type AttemptFirstFactorParams = PasskeyAttempt | EmailCodeAttempt | PhoneCodeAttempt | PasswordAttempt | Web3Attempt | ResetPasswordPhoneCodeAttempt | ResetPasswordEmailCodeAttempt | TrustedDeviceAttempt;
|
|
20
|
-
type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig | EmailCodeSecondFactorConfig | EmailLinkConfig;
|
|
21
|
-
type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | EmailCodeAttempt;
|
|
20
|
+
type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig | EmailCodeSecondFactorConfig | EmailLinkConfig | PassKeyConfig;
|
|
21
|
+
type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | EmailCodeAttempt | PasskeyAttempt;
|
|
22
22
|
type SignInCreateParams = ({
|
|
23
23
|
strategy: OAuthStrategy | EnterpriseSSOStrategy;
|
|
24
24
|
redirectUrl: string;
|
|
@@ -71,6 +71,16 @@ type ResetPasswordParams = {
|
|
|
71
71
|
signOutOfOtherSessions?: boolean;
|
|
72
72
|
};
|
|
73
73
|
type AuthenticateWithPasskeyParams = {
|
|
74
|
+
/**
|
|
75
|
+
* The passkey flow to use when the passkey is the FIRST factor:
|
|
76
|
+
* `'autofill'` (conditional UI) or `'discoverable'` both create a new
|
|
77
|
+
* sign-in and identify the user from the passkey itself, discarding any
|
|
78
|
+
* in-progress sign-in.
|
|
79
|
+
*
|
|
80
|
+
* Omit it to complete the second factor of a sign-in in the
|
|
81
|
+
* `needs_second_factor` (or `needs_client_trust`) status that offers
|
|
82
|
+
* `passkey` among its supported second factors.
|
|
83
|
+
*/
|
|
74
84
|
flow?: 'autofill' | 'discoverable';
|
|
75
85
|
};
|
|
76
86
|
interface SignInStartEmailLinkFlowParams extends StartEmailLinkFlowParams {
|
|
@@ -7,7 +7,7 @@ import { EmailAddressIdentifier, PhoneNumberIdentifier, UsernameIdentifier, Web3
|
|
|
7
7
|
type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'needs_client_trust' | 'needs_new_password' | 'needs_protect_check' | 'complete';
|
|
8
8
|
type SignInIdentifier = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | Web3WalletIdentifier;
|
|
9
9
|
type SignInFirstFactor = EmailCodeFactor | EmailLinkFactor | PhoneCodeFactor | PasswordFactor | PasskeyFactor | ResetPasswordPhoneCodeFactor | ResetPasswordEmailCodeFactor | Web3SignatureFactor | OauthFactor | EnterpriseSSOFactor;
|
|
10
|
-
type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | EmailCodeFactor | EmailLinkFactor;
|
|
10
|
+
type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | EmailCodeFactor | EmailLinkFactor | PasskeyFactor;
|
|
11
11
|
interface UserData {
|
|
12
12
|
firstName?: string;
|
|
13
13
|
lastName?: string;
|
|
@@ -17,8 +17,8 @@ interface UserData {
|
|
|
17
17
|
type SignInFactor = SignInFirstFactor | SignInSecondFactor;
|
|
18
18
|
type PrepareFirstFactorParams = EmailCodeConfig | EmailLinkConfig | PhoneCodeConfig | Web3SignatureConfig | PassKeyConfig | ResetPasswordPhoneCodeFactorConfig | ResetPasswordEmailCodeFactorConfig | OAuthConfig | EnterpriseSSOConfig;
|
|
19
19
|
type AttemptFirstFactorParams = PasskeyAttempt | EmailCodeAttempt | PhoneCodeAttempt | PasswordAttempt | Web3Attempt | ResetPasswordPhoneCodeAttempt | ResetPasswordEmailCodeAttempt | TrustedDeviceAttempt;
|
|
20
|
-
type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig | EmailCodeSecondFactorConfig | EmailLinkConfig;
|
|
21
|
-
type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | EmailCodeAttempt;
|
|
20
|
+
type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig | EmailCodeSecondFactorConfig | EmailLinkConfig | PassKeyConfig;
|
|
21
|
+
type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt | EmailCodeAttempt | PasskeyAttempt;
|
|
22
22
|
type SignInCreateParams = ({
|
|
23
23
|
strategy: OAuthStrategy | EnterpriseSSOStrategy;
|
|
24
24
|
redirectUrl: string;
|
|
@@ -71,6 +71,16 @@ type ResetPasswordParams = {
|
|
|
71
71
|
signOutOfOtherSessions?: boolean;
|
|
72
72
|
};
|
|
73
73
|
type AuthenticateWithPasskeyParams = {
|
|
74
|
+
/**
|
|
75
|
+
* The passkey flow to use when the passkey is the FIRST factor:
|
|
76
|
+
* `'autofill'` (conditional UI) or `'discoverable'` both create a new
|
|
77
|
+
* sign-in and identify the user from the passkey itself, discarding any
|
|
78
|
+
* in-progress sign-in.
|
|
79
|
+
*
|
|
80
|
+
* Omit it to complete the second factor of a sign-in in the
|
|
81
|
+
* `needs_second_factor` (or `needs_client_trust`) status that offers
|
|
82
|
+
* `passkey` among its supported second factors.
|
|
83
|
+
*/
|
|
74
84
|
flow?: 'autofill' | 'discoverable';
|
|
75
85
|
};
|
|
76
86
|
interface SignInStartEmailLinkFlowParams extends StartEmailLinkFlowParams {
|
|
@@ -325,7 +325,7 @@ interface SignInFutureResource {
|
|
|
325
325
|
* <li>`'needs_client_trust'` - The user is signing in from a new device and must complete a [second factor verification](!second-factor-verification) to establish [Device Trust](https://clerk.com/docs/guides/secure/device-trust). See the [Device Trust custom flow guide](https://clerk.com/docs/guides/development/custom-flows/authentication/device-trust) for more information.</li>
|
|
326
326
|
* <li>`'needs_identifier'` - The user's identifier (e.g., email address, phone number, username) hasn't been provided.</li>
|
|
327
327
|
* <li>`'needs_first_factor'` - One of the following [first factor verification](!first-factor-verification) strategies is missing: `'email_link'`, `'email_code'`, `passkey`, `password`, `'phone_code'`, `'web3_base_signature'`, `'web3_metamask_signature'`, `'web3_coinbase_wallet_signature'`, `'web3_okx_wallet_signature'`, `'web3_solana_signature'`, [`OAuthStrategy`](https://clerk.com/docs/reference/types/sso#oauthstrategy), or `'enterprise_sso'`.</li>
|
|
328
|
-
* <li>`'needs_second_factor'` - One of the following [second factor verification](!second-factor-verification) strategies is missing: `'phone_code'`, `'totp'`, `'backup_code'`, `'email_code'`, or `'
|
|
328
|
+
* <li>`'needs_second_factor'` - One of the following [second factor verification](!second-factor-verification) strategies is missing: `'phone_code'`, `'totp'`, `'backup_code'`, `'email_code'`, `'email_link'`, or `'passkey'`.</li>
|
|
329
329
|
* <li>`'needs_new_password'` - The user needs to set a new password. See the [dedicated custom flow](/docs/guides/development/custom-flows/authentication/forgot-password) guide for more information.</li>
|
|
330
330
|
* <li>`'needs_protect_check'` - A Clerk Protect challenge must be resolved before the sign-in can continue. This status is only returned when Protect mid-flow challenges are explicitly enabled for the instance; upgrading the SDK alone does not enable it. When Clerk's UI is loaded, the sign-in methods resolve the challenge in a modal before they return. Otherwise, run the challenge described by `protectCheck` and resolve it via `submitProtectCheck()`. When `sso()` redirects to the identity provider, the challenge runs on the way back through `<HandleSSOCallback />` instead. The pre-built components handle this automatically.</li>
|
|
331
331
|
* </ul>
|
|
@@ -556,6 +556,15 @@ interface SignInFutureResource {
|
|
|
556
556
|
verifyBackupCode: (params: SignInFutureBackupCodeVerifyParams) => Promise<{
|
|
557
557
|
error: ClerkError | null;
|
|
558
558
|
}>;
|
|
559
|
+
/**
|
|
560
|
+
* Uses a passkey to sign in with as a second factor. Only available when
|
|
561
|
+
* the instance allows passkeys to satisfy the second factor and the user
|
|
562
|
+
* has a registered passkey (`passkey` appears in
|
|
563
|
+
* `supportedSecondFactors`).
|
|
564
|
+
*/
|
|
565
|
+
passkey: () => Promise<{
|
|
566
|
+
error: ClerkError | null;
|
|
567
|
+
}>;
|
|
559
568
|
};
|
|
560
569
|
/**
|
|
561
570
|
* Performs a ticket-based sign-in.
|
|
@@ -325,7 +325,7 @@ interface SignInFutureResource {
|
|
|
325
325
|
* <li>`'needs_client_trust'` - The user is signing in from a new device and must complete a [second factor verification](!second-factor-verification) to establish [Device Trust](https://clerk.com/docs/guides/secure/device-trust). See the [Device Trust custom flow guide](https://clerk.com/docs/guides/development/custom-flows/authentication/device-trust) for more information.</li>
|
|
326
326
|
* <li>`'needs_identifier'` - The user's identifier (e.g., email address, phone number, username) hasn't been provided.</li>
|
|
327
327
|
* <li>`'needs_first_factor'` - One of the following [first factor verification](!first-factor-verification) strategies is missing: `'email_link'`, `'email_code'`, `passkey`, `password`, `'phone_code'`, `'web3_base_signature'`, `'web3_metamask_signature'`, `'web3_coinbase_wallet_signature'`, `'web3_okx_wallet_signature'`, `'web3_solana_signature'`, [`OAuthStrategy`](https://clerk.com/docs/reference/types/sso#oauthstrategy), or `'enterprise_sso'`.</li>
|
|
328
|
-
* <li>`'needs_second_factor'` - One of the following [second factor verification](!second-factor-verification) strategies is missing: `'phone_code'`, `'totp'`, `'backup_code'`, `'email_code'`, or `'
|
|
328
|
+
* <li>`'needs_second_factor'` - One of the following [second factor verification](!second-factor-verification) strategies is missing: `'phone_code'`, `'totp'`, `'backup_code'`, `'email_code'`, `'email_link'`, or `'passkey'`.</li>
|
|
329
329
|
* <li>`'needs_new_password'` - The user needs to set a new password. See the [dedicated custom flow](/docs/guides/development/custom-flows/authentication/forgot-password) guide for more information.</li>
|
|
330
330
|
* <li>`'needs_protect_check'` - A Clerk Protect challenge must be resolved before the sign-in can continue. This status is only returned when Protect mid-flow challenges are explicitly enabled for the instance; upgrading the SDK alone does not enable it. When Clerk's UI is loaded, the sign-in methods resolve the challenge in a modal before they return. Otherwise, run the challenge described by `protectCheck` and resolve it via `submitProtectCheck()`. When `sso()` redirects to the identity provider, the challenge runs on the way back through `<HandleSSOCallback />` instead. The pre-built components handle this automatically.</li>
|
|
331
331
|
* </ul>
|
|
@@ -556,6 +556,15 @@ interface SignInFutureResource {
|
|
|
556
556
|
verifyBackupCode: (params: SignInFutureBackupCodeVerifyParams) => Promise<{
|
|
557
557
|
error: ClerkError | null;
|
|
558
558
|
}>;
|
|
559
|
+
/**
|
|
560
|
+
* Uses a passkey to sign in with as a second factor. Only available when
|
|
561
|
+
* the instance allows passkeys to satisfy the second factor and the user
|
|
562
|
+
* has a registered passkey (`passkey` appears in
|
|
563
|
+
* `supportedSecondFactors`).
|
|
564
|
+
*/
|
|
565
|
+
passkey: () => Promise<{
|
|
566
|
+
error: ClerkError | null;
|
|
567
|
+
}>;
|
|
559
568
|
};
|
|
560
569
|
/**
|
|
561
570
|
* Performs a ticket-based sign-in.
|
package/dist/versionSelector.js
CHANGED
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
12
12
|
* @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided
|
|
13
13
|
* @returns The npm tag, version or major version to use
|
|
14
14
|
*/
|
|
15
|
-
const versionSelector = (clerkJSVersion, packageVersion = "6.
|
|
15
|
+
const versionSelector = (clerkJSVersion, packageVersion = "6.40.0") => {
|
|
16
16
|
if (clerkJSVersion) return clerkJSVersion;
|
|
17
17
|
const prereleaseTag = getPrereleaseTag(packageVersion);
|
|
18
18
|
if (prereleaseTag) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionSelector.js","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,
|
|
1
|
+
{"version":3,"file":"versionSelector.js","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,8BAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
|
package/dist/versionSelector.mjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided
|
|
11
11
|
* @returns The npm tag, version or major version to use
|
|
12
12
|
*/
|
|
13
|
-
const versionSelector = (clerkJSVersion, packageVersion = "6.
|
|
13
|
+
const versionSelector = (clerkJSVersion, packageVersion = "6.40.0") => {
|
|
14
14
|
if (clerkJSVersion) return clerkJSVersion;
|
|
15
15
|
const prereleaseTag = getPrereleaseTag(packageVersion);
|
|
16
16
|
if (prereleaseTag) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionSelector.mjs","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,
|
|
1
|
+
{"version":3,"file":"versionSelector.mjs","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,8BAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
|