© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
scojo

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)
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
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.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using autoRefreshToken with auth-helpers-sveltekit
SupabaseSSupabase / help-and-questions
4y ago
Sveltekit Supabase Auth Helpers cookies.set() error
SupabaseSSupabase / help-and-questions
3y ago
Auth-helpers-sveltekit v2 -- supabaseServerClient?
SupabaseSSupabase / help-and-questions
4y ago
Sveltekit auth helpers URLSearchParams empty
SupabaseSSupabase / help-and-questions
4y ago