I create a WPF application to connect to Google firestore database and everything works fine.I create the firebase admin sdk json file in firebase console:
enter image description here
Then in WPF project, I create the variable pointing to the firebase admin sdk json file as the following:
string path = Directory.GetCurrentDirectory() + “dataadminSDK.json”;
then setup the EnvironmentVariable and initialize the database
Environment.SetEnvironmentVariable(“GOOGLE_APPLICATION_CREDENTIALS”, path);
FirestoreDb db = FirestoreDb.Create(“PROJECTID”);
However, I doubt if it is safe to put the Google firebase admin sdk json file in this way?
Any suggestion is appreciated
Thank you very much
However, I doubt if it is safe to put the Google firebase admin sdk json file in this way?