Firebase key \n characters

The downloaded private key to use with firebase admin sdk contains \n characters to represent the newline which are somewhat difficult to deal with and have caused several errors. This is not the case with most of the similar documents I have encountered because the newline is encoded to be formatted correctly in most text editors usually.

Hi @PPars,
Are you referring to the service account .json key?

The production way is to store the file as a secret in Google Cloud Secret Manager, then reference it via the google cloud apis when needed.

If you want to use it locally, just download the .json file with the key and add it to your Firebase Studio project.

Next, inside your .env or .env.local file, set a variable equal to the file path. i.e. FIREBASE_SECRET_ACCOUNT_KEY="./name-of-key-if-stored-at-top-level-directory.json"

Yes that is what I am referring to. the ai assistant had many problems with implementing this.

1 Like

Yeah there are still things “too advanced” for Generative AI right now. Perhaps future models will be able to detect and solve these issues.