From 3b07eec7817f5eb0240e2da0a67c632eb9ca7475 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 11 Nov 2025 06:34:07 +0000 Subject: [PATCH] completionId: cgen-21745690667748c29d0660b939ea696f cgen-21745690667748c29d0660b939ea696f --- server/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/index.ts b/server/index.ts index 600b665e..355bc01d 100644 --- a/server/index.ts +++ b/server/index.ts @@ -768,6 +768,12 @@ export function createServer() { } const redirectUri = `${apiBase}/api/discord/oauth/callback`; + console.log( + "[Discord OAuth Start] Using redirect URI:", + redirectUri, + "from API base:", + apiBase, + ); // Get the state from query params (can be a JSON string with action and redirectTo) let state = req.query.state || "/dashboard"; @@ -784,6 +790,7 @@ export function createServer() { }); const discordOAuthUrl = `https://discord.com/api/oauth2/authorize?${params.toString()}`; + console.log("[Discord OAuth Start] Redirecting to:", discordOAuthUrl); return res.redirect(302, discordOAuthUrl); } catch (e: any) { return res.status(500).json({ error: e?.message || String(e) });