Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Hosting Channels with multiple targets are not all authorized in auth #3002

Open
SamyPesse opened this issue Jan 7, 2021 · 4 comments
Assignees

Comments

@SamyPesse
Copy link
Contributor

When deploying a project with multiple hosting target to Hosting Channels, only one of the target is added as a Firebase Authentication authorized domain.

[REQUIRED] Environment info

firebase-tools: 9.1.1
Platform: MacOS

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

  1. Create a firebase project
  2. Configure multiple hosting target for it
  3. Deploy a channel

[REQUIRED] Expected behavior

All auth target, or a specified one are being added as Authentication authorized domain.

[REQUIRED] Actual behavior

Only one is added. In my case I have 3 Hosting target, and the one being added is the second one.

@samtstern
Copy link
Contributor

@bkendall can you take a look at this one?

@bkendall
Copy link
Contributor

Ah! I bet I know what's going on.

The hints here are that (a) only one is being added and (b) it's the second one. When I tried this, I only saw the "first".

What I expect is happening is that we are doing the deploy process for each of these channels in parallel. Particularly, we're creating the channel and updating the authorized domains list in the same parallel'd logic - creating channels in parallel is safe but updating the authorized domains list is not. Updating the domains means pulling down a list and posting with an updated list, which are all probably clobbering each other.

I confirmed this to be true by making each in serial.

I'm sure there's a slightly better way we can do this. @dahliasalem may be able to take a crack at this first

@bkendall bkendall assigned dahliasalem and unassigned bkendall Jan 12, 2021
@dahliasalem
Copy link
Contributor

Thanks for issue will be fixed by #3030

@bkendall
Copy link
Contributor

Let's leave it open until the PR is merged. Including Fixes: #... in the PR description creates a link that will cause that to happen automatically

@bkendall bkendall reopened this Jan 14, 2021
This was referenced Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants