IssuedAt claim is not verified when jwt.WithIssuedAt() option is given to Parser
Author: ahola-ooklaCreated Dec 8, 2025Updated Aug 11, 2026
In jwt/validator.go, the validation logic for IssuedAt is:
// Check issued-at if the option is enabled
if v.verifyIat {
if err = v.verifyIssuedAt(claims, now, false); err != nil {
errs = append(errs, err)
}
}Because the last parameter to v.verifyIssuedAt(claims, now, false) is false, IssuedAt is not verified even if v.verifyIat is true.
The correct logic is to use v.verifyIssuedAt(claims, now, true).
Source: golang-jwt/jwt