You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid are available: local, ${mockRsaJwkKid}`,
208
+
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid are available: ${mockRsaJwkKid}`,
207
209
});
208
210
}else{
209
211
// This should never be reached. If it does, the suite should fail
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid are available: local, ${mockRsaJwkKid}`,
233
-
});
234
-
}else{
235
-
// This should never be reached. If it does, the suite should fail
236
-
assert.false(true);
237
-
}
238
-
}
228
+
// just less than an hour, the cache TTL
229
+
fakeClock.tick(60*60*1000-5);
230
+
231
+
// re-fetch, 5m cache is expired
232
+
fakeFetch.onCall(1).returns(jsonOk(mockJwks));
233
+
jwk=awaitloadClerkJWKFromRemote({
234
+
secretKey: 'deadbeef',
235
+
kid: mockRsaJwkKid,
236
+
});
237
+
assert.propEqual(jwk,mockRsaJwk);
238
+
239
+
// cache should be cleared, but 5m ttl is still valid
0 commit comments