# JWKS Rate Limit Question

**URL:** <https://community.auth0.com/t/jwks-rate-limit-question/200883>\
**Category:** Get Help\
**Tags:** platform-infrastructure, rate-limits\
**Created:** [June 16, 2026, 2:42pm UTC](https://community.auth0.com/t/jwks-rate-limit-question/200883 "2026-06-16T14:42:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric2/32/25502_2.png) [@eric2](https://community.auth0.com/u/eric2)\
**Post date:** [June 16, 2026, 2:42pm UTC](https://community.auth0.com/t/jwks-rate-limit-question/200883/1 "2026-06-16T14:42:22Z")

</div>

We have used Auth0 for about 9 years in a production environment supporting thousands of users. In the past 2 weeks, we have had 2 incidences where we began hitting rate limits for JWKS.

In researching this, we have found that we have not been following best practices by caching the JWKS. We have been pulling JWKS on both the client side and our server side on each token validation (once per client session). We will obviously be addressing this.

My question is what caused us to finally hit rate limits with this bad behavior after ~9 years? Did something change in how the limits were handled or perhaps they were stated but now are actually enforced? While the above will likely fix our problem, drilling down to root cause on what caused our recent failures is important from an accountability point of view both internally and to our customers. We would appreciate any info that helps us get to that root cause. Thanks so much!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [June 16, 2026, 10:48pm UTC](https://community.auth0.com/t/jwks-rate-limit-question/200883/3 "2026-06-16T22:48:42Z")

</div>

Hi @eric2

Welcome back to the Auth0 Community!

The sudden appearance of what I understand to be `429 Too Many Requests` (Rate Limit) errors for your `/.well-known/jwks.json` endpoint would be the result of recent shift toward stricter, hard-capped rate limit enforcement combined with the gradual, compounding growth of your user base over the last 9 years. What used to be a “soft” limit or a request volume masked by the edge CDN is now strictly metered by Auth0’s modern rate limiting algorithm.

As you already noted, the fix is to implement **JWKS Caching**.

If you are using Node.js, the official `jwks-rsa` library handles this perfectly. For other languages, ensure your JWT validation library supports caching the public key.

**The Best Practice Pattern:**

1. **Fetch Once:** Fetch the JWKS file when your server boots up or on the very first request.
2. **Cache it:** Keep the keys in memory.
3. **Only Refresh on Unknown `kid` :** Your server should _only_ reach out to `/.well-known/jwks.json` again if it receives a JWT with a `kid` (Key ID) in the header that does not match the keys currently in your cache. This indicates Auth0 has rotated the keys, and you need the new one.
4. **Rate-Limit the Refresh (Crucial):** If an attacker sends you 1,000 invalid tokens with fake `kid` s, you don’t want your server to make 1,000 requests to Auth0 trying to find them. Put a cooldown (e.g., “do not refresh JWKS more than once per minute”) on your cache-miss logic.

Let me know if I can help you out with anything else.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![eric2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eric2/32/25502_2.png) [@eric2](https://community.auth0.com/u/eric2)\
**Post date:** [June 17, 2026, 5:58pm UTC](https://community.auth0.com/t/jwks-rate-limit-question/200883/4 "2026-06-17T17:58:32Z")

</div>

Thanks for the response and clarifying the recent shift. That explains what we’re seeing. We’ll make changes to address this.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 1, 2026, 5:58pm UTC](https://community.auth0.com/t/jwks-rate-limit-question/200883/5 "2026-07-01T17:58:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
