ERROR [Better Auth]: State Mismatch. Verification not found

Hey! I am getting the the callback error screen for Google (/api/auth/error?error=please_restart_the_process) in a couple situations:

  • If a user is authenticated on a mobile device using Google Chrome and hits the "Desktop site" option in the Chrome page settings
  • A user is goes through the sign in flow with Google, selects their Google account, is authenticated successfully, but then hits the back button to go back to the Google account select screen (https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?), and then selects the same Google account.
A side note: For some reason I am not able to control the UX of auth errors like this one. I've tried passing in a errorCallbackURL to signIn.social, but it doesn't get returned in this situation. Is there a way to redirect users back to the client where I can handle the error on the frontend with custom UI?

I apologize if I am missing something. Thank you in advance for the help!
Screenshot_2025-03-13_at_10.01.28_PM.png
Was this page helpful?