Download apps/web/src/lib/supabase.ts from aliroya/contiai: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/spaces/aliroya/contiai/resolve/main/apps/web/src/lib/supabase.ts
- Command line
-
hf download hf://spaces/aliroya/contiai/apps/web/src/lib/supabase.ts
-
curl -L -o supabase.ts https://huggingface.co/spaces/aliroya/contiai/resolve/main/apps/web/src/lib/supabase.ts
587 Bytes
| 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 }, | |
| }); | |