Skip to content

fix: use correct FIREBASE_PROJECT_ID for Firebase initialization#54

Open
hitakshiA wants to merge 1 commit into
tekdi:mainfrom
hitakshiA:fix/firebase-project-id-config
Open

fix: use correct FIREBASE_PROJECT_ID for Firebase initialization#54
hitakshiA wants to merge 1 commit into
tekdi:mainfrom
hitakshiA:fix/firebase-project-id-config

Conversation

@hitakshiA
Copy link
Copy Markdown

The serviceAccount object in the PushAdapter constructor was using FIREBASE_PRIVATE_KEY for the projectId field instead of FIREBASE_PROJECT_ID. This causes Firebase Admin SDK initialization to fail, breaking all push notifications.

The getAccessToken() method on line 134 already uses the correct FIREBASE_PROJECT_ID — this was a copy-paste error in the constructor.

What changed

  • src/modules/notification/adapters/pushService.adapter.ts line 25: FIREBASE_PRIVATE_KEY → FIREBASE_PROJECT_ID

No new dependencies. No behavior change for other notification channels.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd804404-3805-42f1-a492-e3d751038b2a

📥 Commits

Reviewing files that changed from the base of the PR and between 34f6df8 and 2792281.

📒 Files selected for processing (1)
  • src/modules/notification/adapters/pushService.adapter.ts

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Corrected Firebase service configuration for push notifications, resolving an initialization issue to ensure notifications are properly delivered.

Walkthrough

A bug fix correcting the Firebase service account configuration to use the proper environment variable FIREBASE_PROJECT_ID for the projectId field instead of the incorrectly referenced FIREBASE_PRIVATE_KEY.

Changes

Cohort / File(s) Summary
Firebase Configuration
src/modules/notification/adapters/pushService.adapter.ts
Corrected serviceAccount.projectId initialization to reference FIREBASE_PROJECT_ID environment variable instead of FIREBASE_PRIVATE_KEY.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: correcting the use of FIREBASE_PROJECT_ID in Firebase initialization instead of the incorrect FIREBASE_PRIVATE_KEY.
Description check ✅ Passed The description is well-related to the changeset, explaining the specific bug fix (copy-paste error), its impact (Firebase initialization failure), the exact change made (line 25), and confirming no other changes or behavior modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant