@clerk/backend 3.12.0-snapshot.v20260720201619 → 3.12.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/api/endpoints/AgentTaskApi.d.ts +1 -1
- package/dist/api/endpoints/AgentTaskApi.d.ts.map +1 -1
- package/dist/api/endpoints/AllowlistIdentifierApi.d.ts +1 -1
- package/dist/api/endpoints/AllowlistIdentifierApi.d.ts.map +1 -1
- package/dist/api/endpoints/DomainApi.d.ts +1 -1
- package/dist/api/endpoints/EnterpriseConnectionApi.d.ts +59 -6
- package/dist/api/endpoints/EnterpriseConnectionApi.d.ts.map +1 -1
- package/dist/api/endpoints/InstanceApi.d.ts +1 -1
- package/dist/api/endpoints/InstanceApi.d.ts.map +1 -1
- package/dist/api/endpoints/InvitationApi.d.ts +1 -1
- package/dist/api/endpoints/UserApi.d.ts +9 -9
- package/dist/api/endpoints/UserApi.d.ts.map +1 -1
- package/dist/api/resources/ExternalAccount.d.ts +1 -1
- package/dist/api/resources/RedirectUrl.d.ts +1 -1
- package/dist/{chunk-H2LJOXRT.mjs → chunk-XPQZDI25.mjs} +10 -13
- package/dist/chunk-XPQZDI25.mjs.map +1 -0
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +9 -12
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/tokens/authenticateContext.d.ts +4 -4
- package/dist/tokens/authenticateContext.d.ts.map +1 -1
- package/dist/tokens/types.d.ts +1 -1
- package/dist/tokens/verify.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-H2LJOXRT.mjs.map +0 -1
package/dist/index.mjs
CHANGED
package/dist/internal.js
CHANGED
|
@@ -320,7 +320,7 @@ module.exports = __toCommonJS(internal_exports);
|
|
|
320
320
|
// src/constants.ts
|
|
321
321
|
var API_URL = "https://api.clerk.com";
|
|
322
322
|
var API_VERSION = "v1";
|
|
323
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.12.0
|
|
323
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.12.0"}`;
|
|
324
324
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
325
325
|
var SUPPORTED_BAPI_VERSION = "2026-05-12";
|
|
326
326
|
var Attributes = {
|
|
@@ -1090,11 +1090,11 @@ var AuthenticateContext = class {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
1092
|
/**
|
|
1093
|
-
* Determines if the referrer URL is from a Clerk domain
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1093
|
+
* Determines if the referrer URL is from a Clerk domain: the instance's FAPI domain, the accounts
|
|
1094
|
+
* portal derived from its frontend API, or — on non-production instances only — a development
|
|
1095
|
+
* account-portal domain.
|
|
1096
1096
|
*
|
|
1097
|
-
* @returns {boolean} True if the referrer is
|
|
1097
|
+
* @returns {boolean} True if the referrer is a trusted Clerk domain, false otherwise
|
|
1098
1098
|
*/
|
|
1099
1099
|
isKnownClerkReferrer() {
|
|
1100
1100
|
if (!this.referrer) {
|
|
@@ -1109,7 +1109,7 @@ var AuthenticateContext = class {
|
|
|
1109
1109
|
return true;
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
if ((0, import_url2.isLegacyDevAccountPortalOrigin)(referrerHost) || (0, import_url2.isCurrentDevAccountPortalOrigin)(referrerHost)) {
|
|
1112
|
+
if (this.instanceType !== "production" && ((0, import_url2.isLegacyDevAccountPortalOrigin)(referrerHost) || (0, import_url2.isCurrentDevAccountPortalOrigin)(referrerHost))) {
|
|
1113
1113
|
return true;
|
|
1114
1114
|
}
|
|
1115
1115
|
const expectedAccountsUrl = (0, import_buildAccountsBaseUrl2.buildAccountsBaseUrl)(this.frontendApi);
|
|
@@ -1119,9 +1119,6 @@ var AuthenticateContext = class {
|
|
|
1119
1119
|
return true;
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
if (referrerHost.startsWith("accounts.")) {
|
|
1123
|
-
return true;
|
|
1124
|
-
}
|
|
1125
1122
|
return false;
|
|
1126
1123
|
} catch {
|
|
1127
1124
|
return false;
|
|
@@ -1921,7 +1918,7 @@ var InvitationAPI = class extends AbstractAPI {
|
|
|
1921
1918
|
*
|
|
1922
1919
|
* Revoking an invitation makes the invitation email link unusable. However, it doesn't prevent the user from signing up if they follow the sign up flow.
|
|
1923
1920
|
*
|
|
1924
|
-
* Only active (i.e
|
|
1921
|
+
* Only active (i.e., non-revoked) invitations can be revoked.
|
|
1925
1922
|
* @param invitationId - The ID of the invitation to revoke.
|
|
1926
1923
|
* @returns The revoked [`Invitation`](https://clerk.com/docs/reference/backend/types/backend-invitation).
|
|
1927
1924
|
*/
|
|
@@ -3744,7 +3741,7 @@ var UserAPI = class extends AbstractAPI {
|
|
|
3744
3741
|
});
|
|
3745
3742
|
}
|
|
3746
3743
|
/**
|
|
3747
|
-
* Disable all of a user's MFA methods (e.g
|
|
3744
|
+
* Disable all of a user's MFA methods (e.g., [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once.
|
|
3748
3745
|
* @param userId - The ID of the user to disable MFA for.
|
|
3749
3746
|
*/
|
|
3750
3747
|
async disableUserMFA(userId) {
|
|
@@ -3790,7 +3787,7 @@ var UserAPI = class extends AbstractAPI {
|
|
|
3790
3787
|
bodyParams: { password }
|
|
3791
3788
|
});
|
|
3792
3789
|
}
|
|
3793
|
-
/** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e
|
|
3790
|
+
/** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e., it will become invalid). Useful for custom auth flows and re-verification. */
|
|
3794
3791
|
async verifyTOTP(params) {
|
|
3795
3792
|
const { userId, code } = params;
|
|
3796
3793
|
this.requireId(userId);
|