Authorizer
Configure JWT authorization with HS256 for the Serverless API Gateway. Includes JOSE JWT error codes, claim validation failures, and fixes for common 401 token errors.
{
"authorizer": {
"type": "jwt",
"secret": "{YOUR_SECRET_KEY}",
"algorithm": "HS256",
"audience": "opensourcecommunity",
"issuer": "serverlessapigw"
},
}Quick Fix Checklist
Check
What to verify
Why it matters
JWT Error
Error code
Common cause
First thing to check
Most Common 401 Root Causes
Symptom
Likely cause
First action
Error Codes and Responses
JOSEAlgNotAllowed
JWEDecryptionFailed
JWEInvalid
JWTExpired
JWTClaimValidationFailed
JWTInvalid
JWKSNoMatchingKey
JWKSInvalid
JWKSMultipleMatchingKeys
JWSInvalid
JWSSignatureVerificationFailed
JWT Verification Failed
See Also
Last updated