Require invite code to create account

This commit is contained in:
Jared Schoeny
2025-10-21 13:44:02 -10:00
parent dd8a1013ba
commit be8a073329
3 changed files with 88 additions and 6 deletions

View File

@@ -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,
}
}
);
}