⚠️ Update OAuth proxy to warn instead of exit when Challonge credentials are missing

This commit is contained in:
2026-01-29 04:35:03 +00:00
parent fc2a528d89
commit 4769193ae4

View File

@@ -25,12 +25,13 @@ const REDIRECT_URI =
process.env.CHALLONGE_REDIRECT_URI || 'http://localhost:5173/oauth/callback'; process.env.CHALLONGE_REDIRECT_URI || 'http://localhost:5173/oauth/callback';
// Validate required environment variables // Validate required environment variables
if (!CLIENT_ID || !CLIENT_SECRET) { const hasChallongeAuth = CLIENT_ID && CLIENT_SECRET;
console.error('❌ Missing required environment variables:'); if (!hasChallongeAuth) {
console.error(' CHALLONGE_CLIENT_ID'); console.warn('⚠️ Challonge OAuth credentials not configured:');
console.error(' CHALLONGE_CLIENT_SECRET'); console.warn(' CHALLONGE_CLIENT_ID');
console.error('\nSet these in your .env file or environment.'); console.warn(' CHALLONGE_CLIENT_SECRET');
process.exit(1); console.warn('\nChallonge OAuth endpoints will be disabled.');
console.warn('Gamemaster API will still work.\n');
} }
app.use( app.use(