@clerk/backend 3.2.7-canary.v20260407011244 → 3.2.7

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.js CHANGED
@@ -1306,7 +1306,7 @@ var M2MToken = class _M2MToken {
1306
1306
  // src/constants.ts
1307
1307
  var API_URL = "https://api.clerk.com";
1308
1308
  var API_VERSION = "v1";
1309
- var USER_AGENT = `${"@clerk/backend"}@${"3.2.7-canary.v20260407011244"}`;
1309
+ var USER_AGENT = `${"@clerk/backend"}@${"3.2.7"}`;
1310
1310
  var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
1311
1311
  var SUPPORTED_BAPI_VERSION = "2025-11-10";
1312
1312
  var Attributes = {
@@ -4932,6 +4932,7 @@ var AuthenticateContext = class {
4932
4932
  this.frontendApi = pk.frontendApi;
4933
4933
  }
4934
4934
  initHeaderValues() {
4935
+ this.method = this.clerkRequest.method;
4935
4936
  this.tokenInHeader = this.parseAuthorizationHeader(this.getHeader(constants.Headers.Authorization));
4936
4937
  this.origin = this.getHeader(constants.Headers.Origin);
4937
4938
  this.host = this.getHeader(constants.Headers.Host);
@@ -5634,7 +5635,10 @@ var HandshakeService = class {
5634
5635
  * @returns boolean indicating if the request is eligible for handshake
5635
5636
  */
5636
5637
  isRequestEligibleForHandshake() {
5637
- const { accept, secFetchDest } = this.authenticateContext;
5638
+ const { accept, method, secFetchDest } = this.authenticateContext;
5639
+ if (method !== "GET") {
5640
+ return false;
5641
+ }
5638
5642
  if (secFetchDest === "document" || secFetchDest === "iframe") {
5639
5643
  return true;
5640
5644
  }
@@ -6208,7 +6212,7 @@ var authenticateRequest = (async (request, options) => {
6208
6212
  }
6209
6213
  }
6210
6214
  }
6211
- const isRequestEligibleForMultiDomainSync = authenticateContext.isSatellite && authenticateContext.secFetchDest === "document";
6215
+ const isRequestEligibleForMultiDomainSync = authenticateContext.isSatellite && authenticateContext.secFetchDest === "document" && authenticateContext.method === "GET";
6212
6216
  const syncedParam = authenticateContext.clerkUrl.searchParams.get(constants.QueryParameters.ClerkSynced);
6213
6217
  const needsSync = syncedParam === constants.ClerkSyncStatus.NeedsSync;
6214
6218
  const syncCompleted = syncedParam === constants.ClerkSyncStatus.Completed;
@@ -6312,6 +6316,7 @@ var authenticateRequest = (async (request, options) => {
6312
6316
  token: authenticateContext.sessionTokenInCookie
6313
6317
  });
6314
6318
  const shouldForceHandshakeForCrossDomain = !authenticateContext.isSatellite && // We're on primary
6319
+ authenticateContext.method === "GET" && // Only GET navigations (POST form submissions set sec-fetch-dest: document too)
6315
6320
  authenticateContext.secFetchDest === "document" && // Document navigation
6316
6321
  authenticateContext.isCrossOriginReferrer() && // Came from different domain
6317
6322
  !authenticateContext.isKnownClerkReferrer() && // Not from Clerk accounts portal or FAPI