Skip to content

Commit a738da1

Browse files
AchoArnoldCopilot
andcommitted
fix(api): always provide credentials to FirebaseApp, improve CI log collection
When FCM_ENDPOINT is set, provide both the custom HTTP client (for transport redirection) AND credentials (for project ID resolution). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ebea98c commit a738da1

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ jobs:
4747
if: failure()
4848
working-directory: ./tests
4949
run: |
50-
docker compose logs api
51-
docker compose logs emulator
50+
docker compose logs --tail 200
5251
5352
- name: Stop services 🛑
5453
if: always()

api/pkg/di/container.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,10 @@ func (container *Container) FirebaseApp() (app *firebase.App) {
414414
base: http.DefaultTransport,
415415
},
416416
}))
417-
} else {
418-
opts = append(opts, option.WithAuthCredentialsJSON(option.ServiceAccount, container.FirebaseCredentials()))
419417
}
420418

419+
opts = append(opts, option.WithCredentialsJSON(container.FirebaseCredentials()))
420+
421421
app, err := firebase.NewApp(context.Background(), nil, opts...)
422422
if err != nil {
423423
msg := "cannot initialize firebase application"

0 commit comments

Comments
 (0)