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
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 ?
He's using sveltekit for the backend probably so tauri dont need to handle server-side.
I solved this problem by writing my own Tauri Storage adapter see this thread
https://discord.com/channels/1288403910284935179/1382232814090588161
Omicrxn is using my package now https://github.com/daveyplate/better-auth-tauri
For Svelte, I'm using it with Next