Using Free Plan and building a React+NextJS app. Starting today we are getting error below. Even after reseting cookies and localStorage get to login page then after I get this error.
Error: No key found in https://{some-domain-but–itisnot-my-domain}.us.auth0.com/.well-known/jwks.json with kid XXXXXXX
Hi @mohammad2,
Welcome to the Auth0 Community!
The “No key found” error is related to your application’s ability to fetch and use the correct public key from your Auth0 tenant’s JWKS endpoint, so given that your domain is not the one present, then the first thing to check is to make sure that the AUTH0_DOMAIN
and AUTH0_AUDIENCE
is set accordingly in your environment to your Auth0 tenant settings.
It is mentioned in our Locate JSON Web Key Sets documentation that
We recommend that you cache your signing keys to improve application performance and avoid running into rate limits
Auth0 periodically rotates its signing keys for security reasons, so if that is the case and you are indeed caching the existing JWKS and not refreshing it, it might be looking for an old kid
that is no longer in the current JWKS.
Our Validate JSON Web Tokens documentation ( that i would definitely recommend checking regarding this matter ) outlines that
All of our backend API quickstarts use SDKs that perform JWT validation and parsing for you
so if you implemented one of our SDK’s this process should be handled automatically. As an extra troubleshooting step i would also recommend going through our quickstart steps once again. Otherwise, so if you are not using one of our SDKs the documentation linked above provides some insightful information on the steps that would have to be considered.
Thanks,
Remus