Better Auth + Tauri + Sveltekit

I have successfully implemented better auth into a sveltekit + tauri app, but once logged if i refresh the session is lost and it is null on the hooks.server.ts (where i do auth guards too). Has anyone succesfully used better auth in tauri?
4 Replies
<keytrap-x86 />
<keytrap-x86 />4mo ago
I'm in the same situation as you but I'm curious to see how did you manage to make better-auth work in taura knowing that you can't use SSR nor use +page.server.ts etc ?
sebastian
sebastian4mo ago
He's using sveltekit for the backend probably so tauri dont need to handle server-side.
Thorlon
Thorlon3mo ago
I solved this problem by writing my own Tauri Storage adapter see this thread https://discord.com/channels/1288403910284935179/1382232814090588161
daveycodez
daveycodez3mo ago
Omicrxn is using my package now https://github.com/daveyplate/better-auth-tauri For Svelte, I'm using it with Next

Did you find this page helpful?