Initializing
Create a new client for use in the browser.
Parameters
The unique Supabase URL which is supplied when you create a new project in your project dashboard.
The unique Supabase Key which is supplied when you create a new project in your project dashboard.
Automatically refreshes the token for logged in users.
Options passed to the gotrue-js instance
Detect a session from the URL. Used for OAuth login callbacks.
A custom `fetch` implementation.
Optional headers for initializing the client.
A storage provider. Used to store the logged in session.
Allows to enable/disable multi-tab/window events
Whether to persist a logged in session to storage.
Options passed to the realtime-js instance
The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'.
Throw errors, instead of returning them.
import { createClient } from '@supabase/supabase-js'
// Create a single supabase client for interacting with your database
const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')