Using sveltekit fetch with supabase auth helpers

Hello!

I'm not sure what I'm doing wrong. Using the @supabase/auth-helpers-sveltekit, and using the getSupabase(event) method in my load function, I am getting a warning in my browser console

using 'window.fetch'. For best results, use the 'fetch' that is passed to your 'load' function

Does anyone have any suggestions on how to use the sveltekit fetch implementation with supabase? I know I can pass it to createClient, but I'm not sure the best place to do that from. The documentation suggests imporing /lib/db.ts in the hooks, but you don't have access to fetch at that point. So far it seems like the earliest I get access to fetch is the root +layout.ts.

I feel like I'm missing something obvious here.

Thanks in advance for any advice.
Was this page helpful?