From 6cbd8a93afd82a7021d45729e56564e3fa07c965 Mon Sep 17 00:00:00 2001 From: nemesislw Date: Tue, 9 Jul 2024 23:11:58 +0530 Subject: [PATCH] chore: personal best practice ocd --- app/(auth)/auth/callback/route.ts | 4 ++-- lib/supabase/client.ts | 4 ++-- lib/supabase/middleware.ts | 4 ++-- lib/supabase/server.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/(auth)/auth/callback/route.ts b/app/(auth)/auth/callback/route.ts index ef45de7..554c4d0 100644 --- a/app/(auth)/auth/callback/route.ts +++ b/app/(auth)/auth/callback/route.ts @@ -11,8 +11,8 @@ export async function GET(request: Request) { if (code) { const cookieStore = cookies(); const supabase = createServerClient( - process.env.NEXT_PUBLIC_SUPABASE_URL!, - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, + process.env.SUPABASE_URL!, + process.env.SUPABASE_ANON_KEY!, { cookies: { get(name: string) { diff --git a/lib/supabase/client.ts b/lib/supabase/client.ts index 9f2891b..5a6ec31 100644 --- a/lib/supabase/client.ts +++ b/lib/supabase/client.ts @@ -2,7 +2,7 @@ import { createBrowserClient } from "@supabase/ssr"; export function createClient() { return createBrowserClient( - process.env.NEXT_PUBLIC_SUPABASE_URL!, - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY! + process.env.SUPABASE_URL!, + process.env.SUPABASE_ANON_KEY! ); } diff --git a/lib/supabase/middleware.ts b/lib/supabase/middleware.ts index 458ea0e..8517697 100644 --- a/lib/supabase/middleware.ts +++ b/lib/supabase/middleware.ts @@ -7,8 +7,8 @@ export async function updateSession(request: NextRequest) { }); const supabase = createServerClient( - process.env.NEXT_PUBLIC_SUPABASE_URL!, - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, + process.env.SUPABASE_URL!, + process.env.SUPABASE_ANON_KEY!, { cookies: { getAll() { diff --git a/lib/supabase/server.ts b/lib/supabase/server.ts index cea41d2..a0f7bd4 100644 --- a/lib/supabase/server.ts +++ b/lib/supabase/server.ts @@ -5,8 +5,8 @@ export function createClient() { const cookieStore = cookies(); return createServerClient( - process.env.NEXT_PUBLIC_SUPABASE_URL!, - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, + process.env.SUPABASE_URL!, + process.env.SUPABASE_ANON_KEY!, { cookies: { getAll() {