I'm trying to initialize the Firebase Admin SDK, in go, using only environment variables (no access to a filesystem).
I have the
service-account-file.json file, and can get it working locally via:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-file.json" ... myfile.go: app, err := firebase.NewApp(context.Background(), nil)
However, I'd like to put the contents of
service-account-file.json into an env var, and init the firebase Admin SDK with its value.
Does anyone have this working? If so can you please provide an example?