Better-auth with external backend

I have backend on sub domain e.g api.example.com and client is tanstack start i setup better-auth client and in vite.config nitro set ruleroute proxy to my backend domain and when try to login everything good i mean when authClient.getSession get data and when use authClient.useSession the data is unreadable and just show questionmark i think it's binary how can fix it. At before in next.js in next.config i set urlRewrite and evrything works.
Also in createAuthclinet base url is app url not backend url beacuse i set urlrewrite
Was this page helpful?