#Where to put secret.json files

1 messages · Page 1 of 1 (latest)

ornate herald
#

I'm using the Google Drive API package and the auth method takes a path to a secret key file. I can't work out how to pass it an object, it seems to really want a path to a file. So I've had to manually add the file to the dist/config config folder and then do:

const auth = new google.auth.GoogleAuth({
      keyFile: path.join(__dirname, '..', '..', 'config', 'secret.json'),
      scopes: SCOPES,
    });

Is this the best approach with these kinds of files? Is there some way I can use the config service? Also, how do I copy the files over as part of the build process?

Any help and guidance would be much appreciated

steep rune