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
Abdiwak
Abdiwak5mo 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. Hi Marek, Since we haven’t heard back, we’ll go ahead and mark this as resolved for now. If you’re still experiencing issues or have any further questions, feel free to reach out anytime. We’re always happy to help

Did you find this page helpful?