import { createClient } from "@supabase/supabase-js"; const url = import.meta.env.VITE_SUPABASE_URL ?? ""; const anonKey = import.meta.env.VITE_SUPABASE_ANON_KEY ?? ""; if (!url || !anonKey) { // Loud on purpose: a blank auth config fails later in a way that looks like // a login bug rather than a missing environment variable. console.error( "VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY are not set - sign-in will not work", ); } export const supabase = createClient(url, anonKey, { auth: { persistSession: true, autoRefreshToken: true, detectSessionInUrl: true }, });