@clerk/backend 3.11.6 → 3.11.7-canary.v20260716060057
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/{chunk-EUUXBEEO.mjs → chunk-UZFXBNKS.mjs} +21 -2
- package/dist/chunk-UZFXBNKS.mjs.map +1 -0
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +20 -1
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/tokens/request.d.ts.map +1 -1
- package/dist/tokens/verify.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-EUUXBEEO.mjs.map +0 -1
|
@@ -284,7 +284,7 @@ var require_dist = __commonJS({
|
|
|
284
284
|
// src/constants.ts
|
|
285
285
|
var API_URL = "https://api.clerk.com";
|
|
286
286
|
var API_VERSION = "v1";
|
|
287
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.11.
|
|
287
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.11.7-canary.v20260716060057"}`;
|
|
288
288
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
289
289
|
var SUPPORTED_BAPI_VERSION = "2026-05-12";
|
|
290
290
|
var Attributes = {
|
|
@@ -6392,6 +6392,17 @@ async function verifyToken(token, options) {
|
|
|
6392
6392
|
}
|
|
6393
6393
|
const { header } = decodedResult;
|
|
6394
6394
|
const { kid } = header;
|
|
6395
|
+
if (header.cat === JWT_CATEGORY_M2M_TOKEN) {
|
|
6396
|
+
return {
|
|
6397
|
+
errors: [
|
|
6398
|
+
new TokenVerificationError({
|
|
6399
|
+
action: TokenVerificationErrorAction.EnsureClerkJWT,
|
|
6400
|
+
reason: TokenVerificationErrorReason.TokenInvalid,
|
|
6401
|
+
message: "Invalid session token category."
|
|
6402
|
+
})
|
|
6403
|
+
]
|
|
6404
|
+
};
|
|
6405
|
+
}
|
|
6395
6406
|
try {
|
|
6396
6407
|
let key;
|
|
6397
6408
|
if (options.jwtKey) {
|
|
@@ -7258,6 +7269,14 @@ var authenticateRequest = (async (request, options) => {
|
|
|
7258
7269
|
if (decodedErrors) {
|
|
7259
7270
|
return handleSessionTokenError(decodedErrors[0], "cookie");
|
|
7260
7271
|
}
|
|
7272
|
+
if (isMachineJwt(authenticateContext.sessionTokenInCookie)) {
|
|
7273
|
+
return signedOut({
|
|
7274
|
+
tokenType: TokenType.SessionToken,
|
|
7275
|
+
authenticateContext,
|
|
7276
|
+
reason: AuthErrorReason.TokenTypeMismatch,
|
|
7277
|
+
message: ""
|
|
7278
|
+
});
|
|
7279
|
+
}
|
|
7261
7280
|
if (decodeResult.payload.iat < authenticateContext.clientUat) {
|
|
7262
7281
|
return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SessionTokenIATBeforeClientUAT, "");
|
|
7263
7282
|
}
|
|
@@ -7604,4 +7623,4 @@ export {
|
|
|
7604
7623
|
debugRequestState,
|
|
7605
7624
|
createAuthenticateRequest
|
|
7606
7625
|
};
|
|
7607
|
-
//# sourceMappingURL=chunk-
|
|
7626
|
+
//# sourceMappingURL=chunk-UZFXBNKS.mjs.map
|