Paul @ On3
BABetter Auth
•Created by Paul @ On3 on 5/15/2025 in #help
JWTClaimValidationFailed: "iat" claim timestamp check failed (it should be in the past)
I have a bunch of test devices and all of them work perfectly fine 100% of the time. However, I have an older device that for some reason has an out-of-sync clock by ~+700ms. Sometimes when logging in the iat claim will be invalid because the server trip takes ~30ms meaning the iat was produced in the future.
It looks like I can fix this use jose's clockTolerance option (https://github.com/panva/jose/blob/main/docs/jwt/verify/interfaces/JWTVerifyOptions.md#clocktolerance), but I can't figure out how to pass this via better-auth.
Any ideas?
1 replies