From a00aca68511dbd2d6d444fc73200ff3e4478f6f6 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 22:19:13 +0000 Subject: [PATCH] Fix redirect logic - Discord OAuth logins always go to dashboard cgen-c0ed43cb66464c13a8e880eaf03ac566 --- api/discord/oauth/callback.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/api/discord/oauth/callback.ts b/api/discord/oauth/callback.ts index c38960cb..2f44da11 100644 --- a/api/discord/oauth/callback.ts +++ b/api/discord/oauth/callback.ts @@ -292,13 +292,8 @@ export default async function handler(req: any, res: any) { res.setHeader("Set-Cookie", [accessTokenCookie, refreshTokenCookie]); - // Redirect to next page - const nextPath = - state && typeof state === "string" && state.startsWith("/") - ? state - : isNewUser - ? "/onboarding" - : "/dashboard"; + // Redirect to dashboard (we only log in existing users here) + const nextPath = "/dashboard"; // Determine the base URL from environment or request origin let baseUrl = process.env.VITE_API_BASE || process.env.API_BASE;