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?
GitHub
jose/docs/jwt/verify/interfaces/JWTVerifyOptions.md at main · panv...
JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes - panva/jose
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?