@astratra/security 1.12.0 → 1.12.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/idTokens.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astratra/security",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Generic authentication and security middleware for Astratra workspaces.",
5
5
  "engines": {
6
6
  "node": ">=20"
package/src/idTokens.js CHANGED
@@ -100,7 +100,7 @@ function createIdTokenVerifier(options = {}) {
100
100
  attemptedAt = now();
101
101
  let body;
102
102
  try {
103
- const signal = typeof AbortSignal !== 'undefined' && AbortSignal.timeout ? AbortSignal.timeout(timeoutMs) : undefined;
103
+ const signal = typeof globalThis.AbortSignal?.timeout === 'function' ? globalThis.AbortSignal.timeout(timeoutMs) : undefined;
104
104
  const response = await fetchImpl(jwksUrl, signal ? { signal } : undefined);
105
105
  if (!response || !response.ok) throw new Error('status');
106
106
  body = await response.json();