From c8cce7f93abcd9397cf82fbe15cf4be4070f212e Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Tue, 9 Dec 2025 01:59:23 +0000 Subject: [PATCH] Set the website's login redirect to always use the production URL Update server configuration to use a fixed production URL for OAuth redirects, simplifying setup and resolving "Invalid redirect URI" errors. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 82696845-8f64-4a63-b9fe-b3735f07d433 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/h41eDR1 Replit-Helium-Checkpoint-Created: true --- .replit | 4 ---- aethex-bot/server/webServer.js | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.replit b/.replit index 4f2f8f5..428d7ec 100644 --- a/.replit +++ b/.replit @@ -17,10 +17,6 @@ expertMode = true localPort = 5000 externalPort = 80 -[[ports]] -localPort = 40493 -externalPort = 3000 - [workflows] runButton = "Project" diff --git a/aethex-bot/server/webServer.js b/aethex-bot/server/webServer.js index 9291c39..d6c5852 100644 --- a/aethex-bot/server/webServer.js +++ b/aethex-bot/server/webServer.js @@ -11,9 +11,8 @@ function createWebServer(discordClient, supabase, options = {}) { const DISCORD_CLIENT_ID = process.env.DISCORD_CLIENT_ID; const DISCORD_CLIENT_SECRET = process.env.DISCORD_CLIENT_SECRET; const SESSION_SECRET = process.env.SESSION_SECRET || crypto.randomBytes(32).toString('hex'); - const BASE_URL = process.env.REPLIT_DEV_DOMAIN - ? `https://${process.env.REPLIT_DEV_DOMAIN}` - : process.env.BASE_URL || 'http://localhost:5000'; + // Always use production URL for OAuth to avoid multiple redirect URIs + const BASE_URL = 'https://aethex-bot-master.replit.app'; app.use(cors({ origin: true,