From 4769193ae49a81fe383e39865a651b965f55a200 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 04:35:03 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A0=EF=B8=8F=20Update=20OAuth=20proxy=20t?= =?UTF-8?q?o=20warn=20instead=20of=20exit=20when=20Challonge=20credentials?= =?UTF-8?q?=20are=20missing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/websites/pokedex.online/server/oauth-proxy.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/websites/pokedex.online/server/oauth-proxy.js b/code/websites/pokedex.online/server/oauth-proxy.js index df8b115..cdb3115 100644 --- a/code/websites/pokedex.online/server/oauth-proxy.js +++ b/code/websites/pokedex.online/server/oauth-proxy.js @@ -25,12 +25,13 @@ const REDIRECT_URI = process.env.CHALLONGE_REDIRECT_URI || 'http://localhost:5173/oauth/callback'; // Validate required environment variables -if (!CLIENT_ID || !CLIENT_SECRET) { - console.error('❌ Missing required environment variables:'); - console.error(' CHALLONGE_CLIENT_ID'); - console.error(' CHALLONGE_CLIENT_SECRET'); - console.error('\nSet these in your .env file or environment.'); - process.exit(1); +const hasChallongeAuth = CLIENT_ID && CLIENT_SECRET; +if (!hasChallongeAuth) { + console.warn('⚠️ Challonge OAuth credentials not configured:'); + console.warn(' CHALLONGE_CLIENT_ID'); + console.warn(' CHALLONGE_CLIENT_SECRET'); + console.warn('\nChallonge OAuth endpoints will be disabled.'); + console.warn('Gamemaster API will still work.\n'); } app.use(