Skip to content

Commit 5c54c55

Browse files
fix: hardcode website link
1 parent d405805 commit 5c54c55

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/lib/supabase/handle-oauth-login.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33
import { redirect } from "next/navigation";
44
import { createClient } from "./server";
55

6-
// 1. Create a helper to get the REAL base URL
7-
const getURL = () => {
8-
let url = process.env.NEXT_PUBLIC_SITE_URL ?? process.env.VERCEL_URL ?? "http://localhost:3000";
9-
10-
url = url.includes("http") ? url : `https://${url}`;
11-
url = url.replace(/\/$/, "");
12-
return url;
13-
};
14-
156
export default async function handleOAuthLogin(provider: "github" | "google") {
167
const supabase = await createClient();
17-
const origin = getURL();
8+
9+
const origin = "https://intro-swe-term-project.vercel.app";
10+
1811
const { error, data } = await supabase.auth.signInWithOAuth({
1912
provider: provider,
2013
options: {

0 commit comments

Comments
 (0)