@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/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createAuthenticateRequest,
3
3
  createBackendApiClient,
4
4
  verifyToken
5
- } from "./chunk-H2LJOXRT.mjs";
5
+ } from "./chunk-XPQZDI25.mjs";
6
6
  import "./chunk-YBVFDYDR.mjs";
7
7
  import {
8
8
  withLegacyReturn
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-snapshot.v20260720201619"}`;
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 (accounts portal or FAPI).
1094
- * This includes both development and production account portal domains, as well as FAPI domains
1095
- * used for redirect-based authentication flows.
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 from a Clerk accounts portal or FAPI domain, false otherwise
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. non-revoked) invitations can be revoked.
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. [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once.
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. it will become invalid). Useful for custom auth flows and re-verification. */
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);