This commit is contained in:
parent
1ac6918ee5
commit
58a0278511
|
|
@ -1,4 +1,5 @@
|
||||||
import { createClient } from "@/lib/supabase/server"
|
//import { createClient } from "@/lib/supabase/server"
|
||||||
|
import { getSupabaseServerClient } from "@/lib/supabase/server"
|
||||||
import { cookies } from "next/headers"
|
import { cookies } from "next/headers"
|
||||||
import { NextResponse } from "next/server"
|
import { NextResponse } from "next/server"
|
||||||
|
|
||||||
|
|
@ -8,8 +9,9 @@ export async function GET(request: Request) {
|
||||||
const next = requestUrl.searchParams.get("next")
|
const next = requestUrl.searchParams.get("next")
|
||||||
|
|
||||||
if (code) {
|
if (code) {
|
||||||
const cookieStore = cookies()
|
//const cookieStore = cookies()
|
||||||
const supabase = createClient(cookieStore)
|
//const supabase = createClient(cookieStore)
|
||||||
|
const supabase = getSupabaseServerClient()
|
||||||
await supabase.auth.exchangeCodeForSession(code)
|
await supabase.auth.exchangeCodeForSession(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue