Better Auth Error after upgrade to 1.2.10

there is an error show after sign-in via google in https://www.better-auth.com/ and my website i try to downgrade and it fixed so the error comes with latest version any fix? http://localhost:3000/api/auth/error?error=please_restart_the_process more info:
2025-06-24T04:41:26.392Z ERROR [Better Auth]: State Mismatch. Verification not found { state: 'xc1fKv04FcvtCeHFV1v9IYUiL_F8AE8f' }
GET /api/auth/callback/google?state=xc1fKv04FcvtCeHFV1v9IYUiL_F8AE8f&code=4%2F0AUJR-x4wMLjQRSHE_aa4BwQaWOV_FvF3gwBJQnyYkjjkj3R0J5RNNS_idEsub3emFh0p7g&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none 302 in 76ms
2025-06-24T04:41:26.392Z ERROR [Better Auth]: State Mismatch. Verification not found { state: 'xc1fKv04FcvtCeHFV1v9IYUiL_F8AE8f' }
GET /api/auth/callback/google?state=xc1fKv04FcvtCeHFV1v9IYUiL_F8AE8f&code=4%2F0AUJR-x4wMLjQRSHE_aa4BwQaWOV_FvF3gwBJQnyYkjjkj3R0J5RNNS_idEsub3emFh0p7g&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none 302 in 76ms
Better Auth
Better Auth
The most comprehensive authentication library for TypeScript.
18 Replies
Eric
Eric4mo ago
Did you get this resolved?
Ping
Ping3mo ago
Did you clear your database or anything like that when upgrading by chance? This should only occur when the provided state value is not found in the database.
yasserconnect
yasserconnectOP3mo ago
no, i didn't .. the problm still exist
Ping
Ping3mo ago
When you get the error and it includes the state in the console, can you match that against your DB and tell me if your DB truely doesn't have that verification value?
yasserconnect
yasserconnectOP3mo ago
I removed onAPIError, and the error is gone. Is that okay, or is it bad practice?
Ping
Ping3mo ago
That's kind of like choosing the ignore the error
yasserconnect
yasserconnectOP3mo ago
i see, can you give me guide to debug please?
Ping
Ping3mo ago
Run the error again, then check your DB in the verification table to see if your DB actually has this value in the value field
No description
Ping
Ping3mo ago
@yasserconnect
yasserconnect
yasserconnectOP3mo ago
the verification table is empty i don't now why i try to fix long time ago but still no luck!
Ping
Ping3mo ago
what do you mean you tried to fix long time ago? Has it always just had nothing in there or something?
yasserconnect
yasserconnectOP3mo ago
When I installed better-auth in the first beta release, the table existed and had records. After that, no new records were added — it's like the table doesn't exist anymore! The only issue I noticed in the guide is that the table is called verification, but mine is called Verification. verification: { modelName: "Verification", },
Ping
Ping3mo ago
Huh.. interesting Can I see your auth config?
yasserconnect
yasserconnectOP3mo ago
sure. client or server?
Ping
Ping3mo ago
Server
Ping
Ping3mo ago
Can you rename your verification table to be lowercase then? Might make things smoother And ofc change the auth config If that fixes it then I may have to go check our code lol
yasserconnect
yasserconnectOP3mo ago
i try that, still same problem ERROR [Better Auth]: State Mismatch. Verification not found { state: 'N3giWPXtYwP6Vg5hpuGxNKD6RlF5W0J-' } GET /api/auth/callback/google?state=N3giWPXtYwP6Vg5hpuGxNKD6RlF5W0J-&code=4%2F0AVMBsJihSeFxV8QYjw3ydGg2M9NAFAlkY5050nnOUUk9OzQgufbzyW8G0RPg-DTXBDCq1w&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&authuser=0&prompt=none 302 in 63ms and the table empty

Did you find this page helpful?