Finally fixed origin
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
"use server";
|
||||
|
||||
import { getOrigin } from "@/lib/origin/server";
|
||||
import * as Core from "./core";
|
||||
import { createClient } from "@/lib/supabase/server";
|
||||
import { headers } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export async function signInWithGitHub() {
|
||||
const supabase = await createClient();
|
||||
|
||||
const h = await headers();
|
||||
const host = h.get("host");
|
||||
const protocol = h.get("x-forwarded-proto") ?? "https";
|
||||
const { host, protocol } = await getOrigin();
|
||||
|
||||
const { data, error } = await supabase.auth.signInWithOAuth({
|
||||
provider: "github",
|
||||
|
||||
Reference in New Issue
Block a user