We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d405805 commit 5c54c55Copy full SHA for 5c54c55
src/lib/supabase/handle-oauth-login.ts
@@ -3,18 +3,11 @@
3
import { redirect } from "next/navigation";
4
import { createClient } from "./server";
5
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
15
export default async function handleOAuthLogin(provider: "github" | "google") {
16
const supabase = await createClient();
17
- const origin = getURL();
+
+ const origin = "https://intro-swe-term-project.vercel.app";
18
const { error, data } = await supabase.auth.signInWithOAuth({
19
provider: provider,
20
options: {
0 commit comments