Overview
This article explains why the following error messages occur after a client makes requests to validate an Access Token, a JSON Web Token (JWT), against /.well-known/openid-configuration and /.well-known/jwks.json:
“http2: server sent GOAWAY and closed the connection”
“ENHANCE_YOUR_CALM”
The error message format can vary depending on the programming language or Software Development Kit (SDK).
Applies To
- Access Tokens
Cause
The error code, ENHANCE_YOUR_CALM, occurs when the server refuses to respond to a client that has made an excessive number of requests.
Solution
Cache the response from the /.well-known/* endpoints to resolve this issue. This information is included with the Auth0 performance best practices documentation Reduce calls to Auth0:
"Cache /.well-known/ responses: This information does not change frequently, so you can usually cache it to reduce the number of times you need to call Auth0."*
An example for go-jwt-middleware is available on the Auth0 Golang API samples GitHub page.