mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 07:51:12 -05:00
Enhance input validation, update environment variable usage for Supabase and Turnstile, and refine image upload and auth logic for better robustness and developer experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cb061c75-702e-4b89-a8d1-77a96cdcdfbb Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/cb061c75-702e-4b89-a8d1-77a96cdcdfbb/ANdRXVZ
23 lines
794 B
TypeScript
23 lines
794 B
TypeScript
// This file is automatically generated. Do not edit it directly.
|
|
import { createClient } from '@supabase/supabase-js';
|
|
import type { Database } from './types';
|
|
|
|
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL;
|
|
const SUPABASE_PUBLISHABLE_KEY = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
|
|
|
if (!SUPABASE_URL || !SUPABASE_PUBLISHABLE_KEY) {
|
|
throw new Error(
|
|
'Missing Supabase environment variables. Please ensure VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are set in your environment.'
|
|
);
|
|
}
|
|
|
|
// Import the supabase client like this:
|
|
// import { supabase } from "@/integrations/supabase/client";
|
|
|
|
export const supabase = createClient<Database>(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, {
|
|
auth: {
|
|
storage: localStorage,
|
|
persistSession: true,
|
|
autoRefreshToken: true,
|
|
}
|
|
}); |