SSR Not Working On Cloudflare

I am using Nuxt in my project and have copied the Better Auth setup from nuxthub-better-auth repo that seems to be working fine in their example. Everything is working fine, the SSR is working fine for everything BUT user/session data. as you can see here https://sutando-client-example.dventures.workers.dev/ as compared to the example https://better-auth.nuxt.dev/user You can see in the __NUXT_DATA__ that the user list api data is there during SSR, but not the user & session data from BetterAuth. Anyone know what could be going wrong?
GitHub
GitHub - atinux/nuxthub-better-auth: A demo of using Better Auth wi...
A demo of using Better Auth with Nuxt & NuxtHub (Cloudflare D1 & KV). - atinux/nuxthub-better-auth
Solution:
Solved kinda .... NuxtHub uses Pages - the SSR for the BetterAuth only seems to work on Pages and not Workers
Jump to solution
4 Replies
Solution
jjjrmy
jjjrmy3w ago
Solved kinda .... NuxtHub uses Pages - the SSR for the BetterAuth only seems to work on Pages and not Workers
darkpool
darkpool3w ago
same problem although I'm using rreact router v7 + workers + d1 + drizzle adapter. Fixed by reverting back to 1.3.4. Pretty sure they are starting a transaction incorrectly with d1.
jjjrmy
jjjrmyOP3w ago
try on Pages
darkpool
darkpool3w ago
actually nvm my issue was unrelated and caused by the organization plugin requiring a new arg.

Did you find this page helpful?