Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Allow JSON string to be passed to GOOGLE_APPLICATION_CREDENTIALS #598

Open
lordvidex opened this issue Dec 5, 2023 · 0 comments
Open

Comments

@lordvidex
Copy link

  • Firebase Product: FCM

In order to use this library to send push notifications, it is necessary to pass the services_account.json file path to the environment variable GOOGLE_APPLICATION_CREDENTIALS.
However, allowing the JSON string to be passed directly will also help for certain scenarios where the the secret do not necessary exist in a file.

In fact, the firebase_config is parsed this way.

For example:

secret := someSecretStore.Get("GOOGLE_CREDS")
os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", secret)
...
# initialize firebase App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants