ERROR [Better Auth]: State not found undefined
Hello I am trying to implement google sign in.
This is my auth
This is my client
This is how I sign in:
It works to the point of sending me to google and letting me choose to continue.
But then when it comes back to the app, I see

Better Auth Error
We encountered an issue while processing your request. Please try again or contact the application owner if the problem persists.
Return to Application
Error Code: Unknown
And in the server console I see:
What could be the cause?
By the way I am using my custom server side framework, but have implemented the integration by following how the fastify example does it.
This is my auth
This is my client
This is how I sign in:
It works to the point of sending me to google and letting me choose to continue.
But then when it comes back to the app, I see
Better Auth Error
We encountered an issue while processing your request. Please try again or contact the application owner if the problem persists.
Return to Application
Error Code: Unknown
And in the server console I see:
ERROR [Better Auth]: State not found undefinedWhat could be the cause?
By the way I am using my custom server side framework, but have implemented the integration by following how the fastify example does it.
Solution
I figured it out. In the step of re-constructing the URL I forgot to include the query string.