© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago
IPJT

Connect to 2 different Supabase projects from the same user

Hi there,
I'm currently using createBrowserClient from @supabase/ssr to create a db-client to be used in the browser-environment.

As seen in the src-code the createBrowserClient is merely a wrapper around createClient from @supabase/supabase-js that returns a cached SupabaseClient-instance making me not having to worry about calling createBrowserClient 1000 times in my app. Great!

However, now i want to create a new client connecting to a different Supabase instance. This client is only to be used in the browser environment. If I call createBrowserClient with a different supabaseUrl and supabaseKey it will just returned the cached version (first of the two DBs being connected to).

There is a "isSingleton" prop I can pass to createBrowserClient to solve this issue. However, that would mean my first connection would use a singleton-pattern whereas my second doesn't (additionally it logs the warning shown in the screenshot). Ideally both clients would be cached.

Thanks in advance.
Ian
image.png
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

how to connect one github repo to different supabase branch projects
SupabaseSSupabase / help-and-questions
5mo ago
2 Projects same auth
SupabaseSSupabase / help-and-questions
3w ago
How to combine 2 Supabase projects?
SupabaseSSupabase / help-and-questions
2w ago
Edge Function 500 error : Different behavior in different supabase projects
SupabaseSSupabase / help-and-questions
3mo ago