Skip to content

Regression (hosting): 13.4.0 does not set oauth authorized domains for preview deploy #6828

Open

Description

@odinho

[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.

Activity

  1. aalej commented on Mar 4, 2024

    @aalej
    Contributor

    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
  2. Splaktar commented on May 1, 2024

    @Splaktar

    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.

  3. eungkyu commented on Jul 23, 2024

    @eungkyu

    Hello, I think the deploy script should throw error if it fails to add custom domain.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions