feat: implement internal auth user creation and update related functionalities
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
|
||||
export function createServiceRoleClient() {
|
||||
const supabaseUrl =
|
||||
process.env.SUPABASE_INTERNAL_URL || process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||||
const serviceRoleKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
|
||||
|
||||
if (!supabaseUrl || !serviceRoleKey) {
|
||||
throw new Error("Supabase service role yapılandırması eksik.");
|
||||
}
|
||||
|
||||
return createClient(supabaseUrl, serviceRoleKey, {
|
||||
auth: {
|
||||
autoRefreshToken: false,
|
||||
persistSession: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user