firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.02k stars 943 forks source link

Documented authentication priority is incorrect #2790

Open pkriete opened 4 years ago

pkriete commented 4 years ago

This is minor, but we tripped over it in our CI today. The readme gives an auth priority order of:

The code has a different order along with the additional --token option:

Since this is likely a docs change, I'll add that it would be nice if the public documentation included the service account option. It's fairly hidden here and the token options don't work in CI if you set a GCP session duration.

[REQUIRED] Environment info

firebase-tools: 8.15.0

Platform: Any

[REQUIRED] Steps to reproduce

export GOOGLE_APPLICATION_CREDENTIALS=service-account.json
export FIREBASE_TOKEN=invalid
firebase projects:list

# Error: Failed to list Firebase projects. See firebase-debug.log for more info.
google-oss-bot commented 4 years ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

samtstern commented 4 years ago

@pkriete thank you for pointing this out! You're right, we need to update the docs. I wish the documented version was actually the correct one, but breaking the order at this point would cause chaos.

@bkendall do you think this is a candidate for a 9.0.0 breaking change? Specifically I think GOOGLE_APPLICATION_CREDENTIALS should probably be at the top of the list, I am fine with the rest of the order.

samtstern commented 4 years ago

Addressing the docs part in https://github.com/firebase/firebase-tools/pull/2792, @pkriete comments welcome!