v1.2.6 and v.1.2.7 throws errors when logging in

Upgrading better-auth to v1.2.6 (using D1Dialect / Cloudflare D1 via kysely-d1) against a verification table where expires_at is a TIMESTAMP/text column throws:
Oops!
Field expires_at not found in model verification
Oops!
Field expires_at not found in model verification
On v1.2.7 it then errors with:
Oops!
D1_TYPE_ERROR: Type 'object' not supported for value 'Sun Apr 27 2025 21:02:32 GMT+0800 (Malaysia Time)'
Oops!
D1_TYPE_ERROR: Type 'object' not supported for value 'Sun Apr 27 2025 21:02:32 GMT+0800 (Malaysia Time)'
Reverting to ≤1.2.5 fixes it. Anyone run into this? Also, unrelated but can we add a React Router V7 tag as Remix was replaced by that?
4 Replies
Ping
Ping2d ago
Can I see your auth config rq?
Kenny
KennyOP15h ago
Ping
Ping15h ago
Hey, I'm not 100% sure this will fix your issue. But I've opened a PR which would make Kysely adapter choose "safer" options when it comes to whether a given DB type supports Dates and other fields. https://github.com/better-auth/better-auth/pull/2478
Kenny
KennyOP15h ago
Same error unfortunately: D1_TYPE_ERROR: Type 'object' not supported for value 'Tue Apr 29 2025 22:26:24 GMT+0800 (Malaysia Time)'

Did you find this page helpful?