firebase-tools
firebase-tools copied to clipboard
Regression (hosting): `13.4.0` does not set oauth authorized domains for preview deploy
[REQUIRED] Environment info
firebase-tools: 13.4.0 (from npx firebase-tools@latest from FirebaseExtended/action-hosting-deploy)
Platform: Ubuntu (GitHub actions runner)
[REQUIRED] Test case
npx firebase-tools@latest hosting:channel:deploy your_preview --only stage --expires 5d --project yourproject --json
[REQUIRED] Steps to reproduce
Run it on a project that require google auth. (Firebase auth using firebaseUI)
[REQUIRED] Expected behavior
Window pops up for you to log in; and no error logging in.
[REQUIRED] Actual behavior
No window popus up, unauthorized error right away since the preview domain is now allow-listed.
Hey @odinho, thanks for reporting this. I was able to reproduce the issue. Let me raise this to our team so that we can further investigate the cause of this.
One thing I’d like to suggest is to try pinning the firebase-tools version in your .yml file as a workaround:
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
'on': pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseToolsVersion: v13.3.1 # <- this part
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOME_TEST_PROJECT_E771B }}'
projectId: some-test-project-e771b
PR #6895 fixed this in v13.6.0, but we had to manually add the roles/serviceusage.serviceUsageConsumer role to the firebase-adminsdk service account in order to get this working again. We are using CircleCI for CI and not GitHub Actions. This issue appears to be fixed.
However, this breaking change should be added to the v13.4.0 Release Notes.