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
This commit is contained in:
parent
54db569a23
commit
c8cce7f93a
2 changed files with 2 additions and 7 deletions
4
.replit
4
.replit
|
|
@ -17,10 +17,6 @@ expertMode = true
|
|||
localPort = 5000
|
||||
externalPort = 80
|
||||
|
||||
[[ports]]
|
||||
localPort = 40493
|
||||
externalPort = 3000
|
||||
|
||||
[workflows]
|
||||
runButton = "Project"
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue