Creates an admin Supabase client that bypasses Row-Level Security.
Uses a secret key for authentication, giving full access to all data. Stateless — one client per request.
Optional
EnvError If SUPABASE_URL is missing or the specified secret key is not found.
SUPABASE_URL
const supabaseAdmin = createAdminClient()const { data } = await supabaseAdmin.from('audit_log').insert({ action: 'user_login' }) Copy
const supabaseAdmin = createAdminClient()const { data } = await supabaseAdmin.from('audit_log').insert({ action: 'user_login' })
Creates an admin Supabase client that bypasses Row-Level Security.
Uses a secret key for authentication, giving full access to all data. Stateless — one client per request.