what's the correct way to setup SvelteKit with Sup...
# javascript
p
what's the correct way to setup SvelteKit with Supabase? The auth works flawlessly on the client side, but how do I get the session details on the server end? There's several examples on github, but all of them themselves claim to be a bit "hacky" and perhaps not the correct way of doing things.
s
Which examples are you looking at?
p
1. This one supports client side auth, but auth for the SSR doesn't work: https://github.com/joshnuss/supabase-sveltekit-example 2. This one claims that it suffer from XSS and has limitations: https://github.com/ashleyconnor/sveltekit-supabase-demo 3. Could really get this one working: https://github.com/one-aalam/svelte-starter-kit Every repo seems to be doing server-side auth things differently 😦
s
Follow example 2 as it does both quite well
The issues that Ashley outline are issues but this is how even Firebase handles refresh tokens so I wouldn't worry about it.
All the issues you see there are the same issue even the NextJS/NuxtJS examples have too
p
ah.. okay. Thanks 🙂 Let me just go ahead with that for now for my MVP.
s
Ping me if you have any Svelte kit issues, I am developing an app with it and Supabase too
p
Thanks a ton! Kindly accept the friend request I sent you on discord. You're only accepting direct messages from people in your friends list 🙂
s
Sorry I meant you can ask questions on here and @ me and I will help where I can
p
ah, okay 😅 Are you a freelancer? I'm looking for paid help with a personal project.
s
I'm not a freelancer, sorry.
p
No worries. Thanks 😄