How to protect Google API Key in an open-source (Github + Heroku) application
问题 I'm creating an application I wish to open-source in the coming weeks. The source code is on Github and Heroku autodeploys the code when there is a new commit if it passes the Travis CI tests. In this application, I've several API keys that I managed to keep out of the open source repository by using env variables in my heroku dynos. For the Google server-to-server API, however, I must have a .p12 file. In php, the following will authenticate my client: $client = new Google_Client(); $client-