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(