Omer Bialer
04/13/2026, 9:11 PMDevRev
04/13/2026, 9:12 PMContent-Type: application/json. A 200 with an HTML error page or an empty body should be rejected immediately.
2. Verify the Response is Valid JSON
Parse the body and confirm it deserializes without errors before doing anything else with it.
3. Check the keys Array Exists and is Non-Empty
The JWKS response must contain a keys field that is a non-empty array. A response like {"keys":[]} is structurally valid JSON but functionally useless — caching it would break all token verification.
{
"keys": [ { "kty": "RSA", "kid": "...", ... } ]
}
Reject and retain your previous cache if keys is missing or empty.
4. Validate Required Fields on Each Key Object
For Descope, keys use RS256, so each key object should have:
• kty — must be "RSA"
• use — typically "sig" (signing key)
For further details, you can refer to the following resources:
• OIDC Endpoints Quickstart | Descope Documentation
• Secure API Calling With Custom GPTs and Descope
• Authenticating APIs With JWT Authorizers and OIDC