guness / bitrise-step-firebase-app-distribution

Upload your apps to Firebase and sends email to your testers.
MIT License
35 stars 28 forks source link

Validation in case FIREBASE_TOKEN is exported in the environment #43

Closed elizedelabrida closed 2 years ago

elizedelabrida commented 2 years ago

It would be great if the script validated if FIREBASE_TOKEN variable is exported (not only firebase_token) and threw an error.

I had a case in Bitrise where there was a secret env var named exactly FIREBASE_TOKEN. This caused an issue while trying to authenticate with a service account, because even while firebase_token inside the script was empty, it was still trying to authenticate using the token:

Captura de Tela 2021-10-19 às 15 57 08

It took me a while to figure out that the problem was a secret env var named FIREBASE_TOKEN. Renaming it solved the problem.

guness commented 2 years ago

Hey, sorry for the trouble. This seems to be a valid issue, but not that urgent. I will look into this in my next release.

elizedelabrida commented 2 years ago

Hey, sorry for the trouble. This seems to be a valid issue, but not that urgent. I will look into this in my next release.

thanks!

odemolliens commented 2 years ago

any news? it has been a long time ago

guness commented 2 years ago

any news? it has been a long time ago

Not really, but let's not wait for new features. I will put this in my TODO list ahead. Thanks for reminding me.

guness commented 2 years ago

I am making a change regarding this. Instead of exporting input from the field, now using this as input the firebase binary.

However firebase app distribution binary itself may read it from environment variables. this is not something we can fix for sure.

I have added a warning just in case.