© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
nish

Using autoRefreshToken with auth-helpers-sveltekit

I am not able to use autoRefreshToken functionality when initiating a client side supabase instance using this code, since auth isn't one of the options:


import { createClient } from '@supabase/auth-helpers-sveltekit'

export const supabase = createClient(import.meta.env.VITE_SUPABASE_URL, import.meta.env.VITE_SUPABASE_ANON_KEY, {
  auth: {
    autoRefreshToken: true
  }
})

import { createClient } from '@supabase/auth-helpers-sveltekit'

export const supabase = createClient(import.meta.env.VITE_SUPABASE_URL, import.meta.env.VITE_SUPABASE_ANON_KEY, {
  auth: {
    autoRefreshToken: true
  }
})


If I bypass the sveltekit helper and use "@supabase/supabase-js" it works, but that isn't what I want.

Any tips?
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 sveltekit fetch with supabase auth helpers
SupabaseSSupabase / help-and-questions
4y ago
Auth-helpers-sveltekit v2 -- supabaseServerClient?
SupabaseSSupabase / help-and-questions
4y ago
Sveltekit auth helpers URLSearchParams empty
SupabaseSSupabase / help-and-questions
4y ago
Can't install auth-helpers-sveltekit
SupabaseSSupabase / help-and-questions
4y ago