@clerk/backend 3.4.8-snapshot.v20260513155808 → 3.4.8

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,12 +2,12 @@ import {
2
2
  createAuthenticateRequest,
3
3
  createBackendApiClient,
4
4
  verifyToken
5
- } from "./chunk-MOCABKGD.mjs";
5
+ } from "./chunk-ELCCIMPN.mjs";
6
6
  import "./chunk-YBVFDYDR.mjs";
7
7
  import {
8
8
  withLegacyReturn
9
9
  } from "./chunk-P263NW7Z.mjs";
10
- import "./chunk-HVNR6UQP.mjs";
10
+ import "./chunk-J2CDX2WG.mjs";
11
11
  import "./chunk-RZ7A7F6X.mjs";
12
12
  import "./chunk-TOROEX6P.mjs";
13
13
 
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.4.8-snapshot.v20260513155808"}`;
323
+ var USER_AGENT = `${"@clerk/backend"}@${"3.4.8"}`;
324
324
  var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
325
325
  var SUPPORTED_BAPI_VERSION = "2025-11-10";
326
326
  var Attributes = {
@@ -735,11 +735,12 @@ var assertAudienceClaim = (aud, audience) => {
735
735
  }
736
736
  }
737
737
  };
738
- var assertHeaderType = (typ, allowedTypes = "JWT") => {
739
- if (typeof typ === "undefined") {
738
+ var assertHeaderType = (typ, allowedTypes) => {
739
+ if (typeof typ === "undefined" && typeof allowedTypes === "undefined") {
740
740
  return;
741
741
  }
742
- const allowed = Array.isArray(allowedTypes) ? allowedTypes : [allowedTypes];
742
+ const expectedTypes = allowedTypes ?? "JWT";
743
+ const allowed = Array.isArray(expectedTypes) ? expectedTypes : [expectedTypes];
743
744
  if (!allowed.includes(typ)) {
744
745
  throw new TokenVerificationError({
745
746
  action: TokenVerificationErrorAction.EnsureClerkJWT,
@@ -954,7 +955,7 @@ async function verifyJwt(token, options) {
954
955
  try {
955
956
  const { azp, sub, aud, iat, exp, nbf } = payload;
956
957
  assertSubClaim(sub);
957
- assertAudienceClaim([aud], [audience]);
958
+ assertAudienceClaim(aud, audience);
958
959
  assertAuthorizedPartiesClaim(azp, authorizedParties);
959
960
  assertExpirationClaim(exp, clockSkew);
960
961
  assertActivationClaim(nbf, clockSkew);