mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-12-06 00:34:17 -06:00
Require invite code to create account
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createServerClient } from "@supabase/ssr";
|
||||
import { createClient as createSupabaseClient } from "@supabase/supabase-js";
|
||||
import { cookies } from "next/headers";
|
||||
import { Database } from "@/types/db";
|
||||
|
||||
@@ -30,3 +31,17 @@ export async function createClient() {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export async function createServiceClient() {
|
||||
return createSupabaseClient<Database>(
|
||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||
process.env.SUPABASE_SECRET_KEY!,
|
||||
{
|
||||
auth: {
|
||||
persistSession: false,
|
||||
autoRefreshToken: false,
|
||||
detectSessionInUrl: false,
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user