Search code examples
securitykeyservice-accountsgoogle-home

How to manage service account key json file for smart home


I'm currently building out a Google Home project in NodeJs that has a fulfillment service that uses a downloaded service account key. This key is deployed with my fulfillment service to my firebase function.

I'd like to avoid storing the key in an environment variable and I would absolutely like to avoid other members of my team needing to downloading a new key for deployments.

I see with some google services you can use ADC to automatically get the service credentials but I can't seem to find a way to get the same information as the json file through the google-auth-library.

Is there a way to initialize the smarthome service from the actions-on-google-nodejs library from the service account assigned to the function?


Solution

  • For anyone looking for an answer to this, it's been a couple months and it seems Google has included requestSync and reportState into the googleapis npm package (that or I completely missed it before). This package no longer requires a service account key.