@forklaunch/core 1.3.13 → 1.3.14
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/lib/http/index.js +10 -1
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +10 -1
- package/lib/http/index.mjs.map +1 -1
- package/lib/persistence/index.js +45 -1
- package/lib/persistence/index.js.map +1 -1
- package/lib/persistence/index.mjs +46 -2
- package/lib/persistence/index.mjs.map +1 -1
- package/lib/services/index.d.mts +1 -1
- package/lib/services/index.d.ts +1 -1
- package/lib/services/index.js.map +1 -1
- package/lib/services/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/http/index.js
CHANGED
|
@@ -422,7 +422,16 @@ async function getCachedJwks(jwksPublicKeyUrl) {
|
|
|
422
422
|
return cachedJwks.value;
|
|
423
423
|
} else {
|
|
424
424
|
const jwksResponse = await fetch(jwksPublicKeyUrl);
|
|
425
|
-
const
|
|
425
|
+
const text = await jwksResponse.text();
|
|
426
|
+
if (!text) {
|
|
427
|
+
if (cachedJwks.value) {
|
|
428
|
+
return cachedJwks.value;
|
|
429
|
+
}
|
|
430
|
+
throw new Error(
|
|
431
|
+
`JWKS endpoint returned empty response (status ${jwksResponse.status})`
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
const jwks = JSON.parse(text).keys;
|
|
426
435
|
cachedJwks.value = jwks;
|
|
427
436
|
cachedJwks.lastUpdated = /* @__PURE__ */ new Date();
|
|
428
437
|
cachedJwks.ttl = parseInt(
|