High number of calls to jwks endpoint and .well-known and endpoint #11589
Unanswered
frank-long
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm noticing a high number of calls to the configured jwks endpoint which is configured through the .well-known endpoint. Looking at the next-auth code, the following is called for each callback/signin made
const client = new issuer.Client({ client_id: provider.clientId, client_secret: provider.clientSecret, redirect_uris: [provider.callbackUrl], ...provider.client }, provider.jwks); client[_openidClient.custom.clock_tolerance] = 10; return client;
Is there a way to have control over caching this client thereby minimising the number of calls to the jwks endpoint. I don't need to call the jwks endpoint for every sign in request. I only need to call it when a jwks key has been rotated. Interested in how others have dealt with jwks key rotation using next-auth.
Beta Was this translation helpful? Give feedback.
All reactions