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,