diff --git a/packages/access-token-jwt/src/get-key-fn.ts b/packages/access-token-jwt/src/get-key-fn.ts index adc05a0..27c079f 100644 --- a/packages/access-token-jwt/src/get-key-fn.ts +++ b/packages/access-token-jwt/src/get-key-fn.ts @@ -13,10 +13,11 @@ export type JWKSOptions = Required< Pick; export default ({ - secret, + agent, cooldownDuration, timeoutDuration, cacheMaxAge, + secret }: JWKSOptions) => { let getKeyFn: GetKeyFn; let prevjwksUri: string; @@ -28,6 +29,7 @@ export default ({ if (!getKeyFn || prevjwksUri !== jwksUri) { prevjwksUri = jwksUri; getKeyFn = createRemoteJWKSet(new URL(jwksUri), { + agent, cooldownDuration, timeoutDuration, cacheMaxAge,