Intermittent Error: `Authentication flow: State mismatch`
Hello all -- I am working on a project, and using Kinde for auth (which I quite love).
For this current project that I am working on, I've been intermittently getting this error as soon as I authenticate (with credentials).
This error is shown on the URL "<mydomain>/api/auth/kinde_callback".
Stack:
Using Nextjs 15+, React 19+, kinde-oss/kinde-auth-nextjs ^2.8.0, deployed on Vercel.
I've been testing using the same browser, and the same account. The authentication works some of the times, but gives this error the other times.
I have verified that the following env variables are set on Vercel, and the domain is consistent:
Is this a known issues? Any guidance around how to debug? Happy to provide more details (domain, account etc.) in DM.
TY!
For this current project that I am working on, I've been intermittently getting this error as soon as I authenticate (with credentials).
{"error":"Authentication flow: State mismatch. Received: <some-string> | Expected: <some-other-string>"}This error is shown on the URL "<mydomain>/api/auth/kinde_callback".
Stack:
Using Nextjs 15+, React 19+, kinde-oss/kinde-auth-nextjs ^2.8.0, deployed on Vercel.
I've been testing using the same browser, and the same account. The authentication works some of the times, but gives this error the other times.
I have verified that the following env variables are set on Vercel, and the domain is consistent:
Is this a known issues? Any guidance around how to debug? Happy to provide more details (domain, account etc.) in DM.
TY!