@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.
@@ -346,7 +346,16 @@ async function getCachedJwks(jwksPublicKeyUrl) {
346
346
  return cachedJwks.value;
347
347
  } else {
348
348
  const jwksResponse = await fetch(jwksPublicKeyUrl);
349
- const jwks = (await jwksResponse.json()).keys;
349
+ const text = await jwksResponse.text();
350
+ if (!text) {
351
+ if (cachedJwks.value) {
352
+ return cachedJwks.value;
353
+ }
354
+ throw new Error(
355
+ `JWKS endpoint returned empty response (status ${jwksResponse.status})`
356
+ );
357
+ }
358
+ const jwks = JSON.parse(text).keys;
350
359
  cachedJwks.value = jwks;
351
360
  cachedJwks.lastUpdated = /* @__PURE__ */ new Date();
352
361
  cachedJwks.ttl = parseInt(