Google Cloud & Firebase Audit
Complete configuration checklist for push notifications
Firebase Cloud Messaging Admin Role
Service account has FCM Admin permissions
Service Account Key Downloaded
JSON key stored as FIREBASE_ADMINSDK secret
Additional Recommended Roles
Optional roles for enhanced functionality
Roles:
- • Firebase Admin SDK Administrator Service Agent
- • Firebase Rules System (for security rules)
- • Cloud Datastore User (if using Firestore)
Generate VAPID Key Pair
Required for browser push notifications
📋 Steps:
- Go to Firebase Console → Project Settings
- Click "Cloud Messaging" tab
- Scroll to "Web Push certificates"
- Click "Generate key pair"
- Copy the key (starts with "B...")
- Save this key - you'll need it in your frontend
// Add to NotificationManager.jsx const vapidKey = 'YOUR_VAPID_KEY_HERE';
Add VAPID Key to Frontend
Update NotificationManager component with VAPID key
API Key Restrictions
Restrict Firebase API keys to specific domains
📋 Steps:
- Go to Google Cloud Console
- Navigate to: APIs & Services → Credentials
- Find your Firebase API keys
- Click each key → "Application restrictions"
- Select "HTTP referrers (web sites)"
- Add your Base44 domain
- Save restrictions
Service Account Key Security
Keep service account JSON secure
⚠️ Security:
- ❌ NEVER commit to Git/GitHub
- ❌ NEVER expose in frontend code
- ✅ Store only in Base44 secrets
- ✅ Use server-side functions only
- ✅ Rotate keys every 90 days
Test Notification from Firebase Console
Send a test message to verify setup
📋 Steps:
- Go to Firebase Console → Cloud Messaging
- Click "Send your first message"
- Enter notification title and text
- Click "Send test message"
- Enter your FCM token from the app
- Click "Test" - notification should appear!
Test from Browser Console
Test programmatic notification sending
// Browser console:
const { base44 } = await import('@/api/base44Client');
await base44.functions.invoke('sendFirebaseNotification', {
user_email: 'your@email.com',
title: '🎉 Test Notification',
body: 'FCM is working!',
click_url: '/Home'
});Test Background Notifications
Verify notifications work when app is closed
📋 Steps:
- Enable notifications on /Profile
- Close all app tabs completely
- Send a test notification
- Notification should appear!
- Click it - app should open
Understand FCM Quotas
Know your limits to avoid service disruptions
No rate limit on message sends
Total notification + data payload
Unlimited device token registrations
Messages delivered within 4 weeks or dropped
Update Privacy Policy
Disclose use of push notifications
Required Disclosures:
- • That you collect FCM tokens
- • How notification data is used
- • How users can opt-out
- • Third-party data sharing (Firebase/Google)
- • Data retention period
User Consent
Browser prompts for notification permission
GDPR Compliance
Ensure GDPR compliance for EU users
- ✓ Obtain explicit consent
- ✓ Allow users to withdraw consent
- ✓ Provide data deletion on request
- ✓ Document data processing
🎯 Critical Actions (Do First):
- Enable Firebase Cloud Messaging API in Google Cloud Console
- Generate VAPID key pair in Firebase Console
- Add VAPID key to NotificationManager component
- Test notification sending from browser console
⭐ Recommended Actions:
- Set up API key restrictions for security
- Configure budget alerts to monitor costs
- Update privacy policy with FCM disclosures
- Enable Cloud Monitoring for advanced insights