Authentication & Notifications
Firebase, Google Sign-In & FCM Push Notifications
Step-by-step instructions detailing exactly where Google Sign-In keys, OAuth client IDs, and Firebase Cloud Messaging credentials are placed in the codebase and admin panel.
🔥 1. Firebase Project Setup
- Go to the Firebase Console and click Add Project (e.g.,
VibeMatch-App). - Disable Google Analytics (or enable if desired) and create the project.
- Navigate to Authentication > Sign-in method. Enable Google and Phone authentication.
🤖 2. Android App Credentials
- In Firebase Console, click the Android icon to add an Android app.
- Enter the package name:
com.vibematch.app(or your custom package name). - Add SHA-1 Fingerprint: Crucial for Google Sign-In and Phone SMS Auth. Run in your terminal:
cd flutter_app/android && ./gradlew signingReportCopy the
SHA-1andSHA-256keys and add them to your Android app settings in Firebase Console. - Download the generated google-services.json file.
- Place it in the Flutter codebase at:
flutter_app/android/app/google-services.json
🍎 3. iOS App Credentials
- In Firebase Console, click Add App and choose iOS.
- Enter your iOS Bundle Identifier:
com.vibematch.app. - Download the generated GoogleService-Info.plist file.
- Open
flutter_app/ios/Runner.xcworkspacein Xcode, drag and drop GoogleService-Info.plist into theRunnerfolder, and check Copy items if needed.flutter_app/ios/Runner/GoogleService-Info.plist
🔔 4. Firebase Cloud Messaging (FCM) & Backend Setup
To deliver real-time push notifications for incoming video calls, direct messages, and diamond gift alerts when the app is in the background:
- In Firebase Console, navigate to Project Settings > Service Accounts.
- Click Generate New Private Key. Download the generated JSON credentials file.
- Navigate to your VibeMatch Admin Panel: Admin Panel > Settings > Firebase & Auth.
- Paste the Firebase Project ID and upload/paste your Firebase Service Account JSON.
- Click Save Firebase Settings. The backend initializes the Firebase Admin SDK dynamically.
✅ 5. How to Verify Push Notifications are Delivered
- Install the built APK or run
flutter runon a physical device. - Log in to the app. When prompted, grant the Notification Permission dialog.
- Send the app to the background (press Home button or lock the screen).
- From another account (or test user), send a direct text message or start a video call.
- Expected Result: An instant push notification banner with sound and partner avatar appears in the Android notification shade / iOS Notification Center.
- Log Verification: Check device logs via
adb logcat -s "FLTFireMsgService"to inspect token registration.