@clerk/backend 3.4.2-snapshot.v20260429150611 → 3.4.2
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-TYMAXIGL.mjs → chunk-EFHKSFRG.mjs} +25 -3
- package/dist/chunk-EFHKSFRG.mjs.map +1 -0
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +24 -2
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +1 -2
- package/dist/proxy.js.map +1 -1
- package/dist/proxy.mjs +1 -2
- package/dist/proxy.mjs.map +1 -1
- package/dist/tokens/authenticateContext.d.ts.map +1 -1
- package/dist/tokens/clerkRequest.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-TYMAXIGL.mjs.map +0 -1
|
@@ -194,7 +194,7 @@ var require_dist = __commonJS({
|
|
|
194
194
|
// src/constants.ts
|
|
195
195
|
var API_URL = "https://api.clerk.com";
|
|
196
196
|
var API_VERSION = "v1";
|
|
197
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2
|
|
197
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.4.2"}`;
|
|
198
198
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
199
199
|
var SUPPORTED_BAPI_VERSION = "2025-11-10";
|
|
200
200
|
var Attributes = {
|
|
@@ -384,6 +384,7 @@ function assertValidPublishableKey(val) {
|
|
|
384
384
|
|
|
385
385
|
// src/tokens/authenticateContext.ts
|
|
386
386
|
import { buildAccountsBaseUrl as buildAccountsBaseUrl2 } from "@clerk/shared/buildAccountsBaseUrl";
|
|
387
|
+
import { getAutoProxyUrlFromEnvironment } from "@clerk/shared/proxy";
|
|
387
388
|
import { isCurrentDevAccountPortalOrigin, isLegacyDevAccountPortalOrigin } from "@clerk/shared/url";
|
|
388
389
|
|
|
389
390
|
// src/tokens/tokenTypes.ts
|
|
@@ -404,6 +405,14 @@ var AuthenticateContext = class {
|
|
|
404
405
|
* Used for backend operations like token validation and issuer checking.
|
|
405
406
|
*/
|
|
406
407
|
this.originalFrontendApi = "";
|
|
408
|
+
const autoProxyPath = getAutoProxyUrlFromEnvironment({
|
|
409
|
+
publishableKey: options.publishableKey ?? "",
|
|
410
|
+
hasProxyUrl: !!options.proxyUrl,
|
|
411
|
+
hasDomain: !!options.domain
|
|
412
|
+
});
|
|
413
|
+
if (autoProxyPath) {
|
|
414
|
+
options = { ...options, proxyUrl: `${clerkRequest.clerkUrl.origin}${autoProxyPath}` };
|
|
415
|
+
}
|
|
407
416
|
if (options.acceptsToken === TokenType.M2MToken || options.acceptsToken === TokenType.ApiKey) {
|
|
408
417
|
this.initHeaderValues();
|
|
409
418
|
} else {
|
|
@@ -5120,7 +5129,20 @@ var createClerkUrl = (...args) => {
|
|
|
5120
5129
|
var ClerkRequest = class extends Request {
|
|
5121
5130
|
constructor(input, init) {
|
|
5122
5131
|
const url = typeof input !== "string" && "url" in input ? input.url : String(input);
|
|
5123
|
-
|
|
5132
|
+
let cloneInit;
|
|
5133
|
+
if (init) {
|
|
5134
|
+
cloneInit = init;
|
|
5135
|
+
} else if (typeof input !== "string") {
|
|
5136
|
+
cloneInit = new Proxy(input, {
|
|
5137
|
+
get(target, prop) {
|
|
5138
|
+
if (prop === "signal") {
|
|
5139
|
+
return void 0;
|
|
5140
|
+
}
|
|
5141
|
+
return Reflect.get(target, prop, target);
|
|
5142
|
+
}
|
|
5143
|
+
});
|
|
5144
|
+
}
|
|
5145
|
+
super(url, cloneInit);
|
|
5124
5146
|
this.clerkUrl = this.deriveUrlFromHeaders(this);
|
|
5125
5147
|
this.cookies = this.parseCookies(this);
|
|
5126
5148
|
}
|
|
@@ -6375,4 +6397,4 @@ export {
|
|
|
6375
6397
|
debugRequestState,
|
|
6376
6398
|
createAuthenticateRequest
|
|
6377
6399
|
};
|
|
6378
|
-
//# sourceMappingURL=chunk-
|
|
6400
|
+
//# sourceMappingURL=chunk-EFHKSFRG.mjs.map
|