Attempting to commit invalid token - OpenNext on Cloudflare

Hey! The issue around login vs prefetch was fixed on latest version of opennext, but now, on auth_callback I get into "attmepting to commit invalid token to memory" issue. Not sure what can be the reason? Locally it is working well, but configs are aligned.
1 Reply
Ages - Kinde
Ages - Kinde2w ago
Hi Marek, Thanks for reaching out. This error usually means the token received during auth_callback is invalid or not being handled correctly in the deployed environment. Since it's working locally, it could be related to differences in how Cloudflare handles cookies, headers, or secure storage. Please check the following: - Ensure all Kinde environment variables are set correctly in your Cloudflare environment. - Confirm that the deployment uses HTTPS and matches the redirect_uri configured in your Kinde app. - Check if any middleware or edge logic is modifying the request or response during the callback. If everything looks correct and the issue persists, feel free to share more about your deployment setup, and we’ll be happy to investigate further.

Did you find this page helpful?