feat: Add prayer chains, social sharing, and testimony wall
- Add PrayerChain component for visualizing linked prayers - Add SharePrayer component with social media integration (Twitter, Facebook, WhatsApp, copy link) - Create /testimonies page for public answered prayer stories - Update Firestore rules for public testimony access - Enhance Organization tab with prayer chains - Add Testimonies navigation tab - Fix Firebase Admin SDK integration for server-side operations - Improve email system with proper server-side authentication - Update prayer form to handle optional fields correctly - Deploy updated Firestore security rules
This commit is contained in:
1 parent
7214fdb89a
commit
d9784738e4
32 files changed
+3146
-3236
No files matched your search
@@ -0,0 +1,61 @@
|
||||
// Debug script to check SMTP configuration
|
||||
// Run with: node debug-smtp.js
|
||||
|
||||
import { initializeApp } from 'firebase/app';
|
||||
import { getFirestore, doc, getDoc } from 'firebase/firestore';
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyAHtvhdtBxNwf0UE3Fp5P0v1vITZKhLMJw",
|
||||
authDomain: "prayer-app-6701f.firebaseapp.com",
|
||||
projectId: "prayer-app-6701f",
|
||||
storageBucket: "prayer-app-6701f.firebasestorage.app",
|
||||
messagingSenderId: "555011794707",
|
||||
appId: "1:555011794707:web:a3d60bdee742578cca1ce6"
|
||||
};
|
||||
|
||||
const app = initializeApp(firebaseConfig);
|
||||
const db = getFirestore(app);
|
||||
|
||||
async function debugSMTP() {
|
||||
try {
|
||||
console.log('🔍 Checking SMTP configuration in Firestore...');
|
||||
|
||||
const configDoc = await getDoc(doc(db, 'config', 'smtp'));
|
||||
|
||||
if (configDoc.exists()) {
|
||||
const config = configDoc.data();
|
||||
console.log('✅ SMTP config found:');
|
||||
console.log(` Host: ${config.host || 'MISSING'}`);
|
||||
console.log(` Port: ${config.port || 'MISSING'}`);
|
||||
console.log(` Secure: ${config.secure}`);
|
||||
console.log(` User: ${config.user ? 'Set' : 'MISSING'}`);
|
||||
console.log(` Pass: ${config.pass ? 'Set' : 'MISSING'}`);
|
||||
console.log(` From: ${config.from || 'MISSING'}`);
|
||||
|
||||
// Check for common issues
|
||||
if (!config.host) console.log('❌ ERROR: Host is missing');
|
||||
if (!config.port) console.log('❌ ERROR: Port is missing');
|
||||
if (!config.user) console.log('❌ ERROR: Username is missing');
|
||||
if (!config.pass) console.log('❌ ERROR: Password is missing');
|
||||
if (!config.from) console.log('❌ ERROR: From email is missing');
|
||||
|
||||
if (config.host && config.port && config.user && config.pass && config.from) {
|
||||
console.log('✅ Configuration looks complete');
|
||||
console.log('💡 If email still fails, check:');
|
||||
console.log(' - SMTP server credentials are correct');
|
||||
console.log(' - Firewall/antivirus not blocking connection');
|
||||
console.log(' - Gmail: Using App Password (not regular password)');
|
||||
}
|
||||
} else {
|
||||
console.log('❌ SMTP configuration not found in Firestore!');
|
||||
console.log('💡 Set it up in Admin panel: http://localhost:3000/admin');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('❌ Error checking SMTP config:', error.message);
|
||||
if (error.code === 'permission-denied') {
|
||||
console.log('💡 Permission denied - make sure Firestore rules allow config access');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debugSMTP();
|
||||
Reference in new issue
Block a user