Add Google OAuth authentication system #4

Merged
stephen merged 6 commits from dev into main 2026-01-21 19:15:22 -07:00
13 changed files with 1177 additions and 34 deletions
Showing only changes of commit 89daa0c395 - Show all commits

View File

@ -20,6 +20,17 @@ if (!process.env.MONGO_URI && process.env.NODE_ENV === 'production') {
process.exit(1); process.exit(1);
} }
const MONGO_URI = process.env.MONGO_URI || "mongodb://localhost:27017"; const MONGO_URI = process.env.MONGO_URI || "mongodb://localhost:27017";
// Log environment configuration status (safe - no secret values)
console.log('📋 Environment Configuration:');
console.log(` NODE_ENV: ${process.env.NODE_ENV || 'development'}`);
console.log(` MONGO_URI: ${MONGO_URI ? '✓ Set' : '✗ Missing'}`);
console.log(` GOOGLE_CLIENT_ID: ${process.env.GOOGLE_CLIENT_ID ? '✓ Set' : '✗ Missing'}`);
console.log(` GOOGLE_CLIENT_SECRET: ${process.env.GOOGLE_CLIENT_SECRET ? '✓ Set' : '✗ Missing'}`);
console.log(` GOOGLE_CALLBACK_URL: ${process.env.GOOGLE_CALLBACK_URL || '✗ Missing'}`);
console.log(` JWT_SECRET: ${process.env.JWT_SECRET ? `✓ Set (${process.env.JWT_SECRET.length} chars)` : '✗ Missing'}`);
console.log(` FRONTEND_URL: ${process.env.FRONTEND_URL || 'http://localhost:5173 (default)'}`);
console.log(` ACTIVITY_LOG_LEVEL: ${process.env.ACTIVITY_LOG_LEVEL || 'all (default)'}`);
const DB_NAME = "apartments"; const DB_NAME = "apartments";
const UNITS_COLLECTION = "units_migration_test"; const UNITS_COLLECTION = "units_migration_test";
const PRICES_COLLECTION = "unit_prices_migration_test"; const PRICES_COLLECTION = "unit_prices_migration_test";