Client-side data fetch with RLS
Hello, I'm following the 0.7.0+ Svelte-Kit Auth implementation and I've followed this documentation quite closely: https://supabase.com/docs/guides/auth/auth-helpers/sveltekit#client-side-data-fetching-with-rls
^^ Even though I check for
Thus, every time I refresh the page, all queries return an empty array.
Unless, I wrap the supabaseClient call in
---
I saw someone made a similar post but using nextjs, that post said not only do you have to look for the user, but also
^^ Even though I check for
user and it is populated, the supabaseClient call will still make my call with my anon key and not the user's token.Thus, every time I refresh the page, all queries return an empty array.
Unless, I wrap the supabaseClient call in
setTimeout(()=>{},0). This feels like a hack and I'm wondering what I'm missing?---
I saw someone made a similar post but using nextjs, that post said not only do you have to look for the user, but also
isLoadingUser. Looking through the documentation I don't see any mention of that or understand if that's a purely nextjs/react thing?Convenience helpers for implementing user authentication in SvelteKit.