How to upload a json file with secret keys to Heroku

后端 未结 3 2024
夕颜
夕颜 2021-01-08 01:01

I\'m building a rails app that pulls data from Google Analytics using the Google Api Client Library for Ruby.

I\'m using OAuth2 and can get everything working in dev

3条回答
  •  醉梦人生
    2021-01-08 01:30

    By search github I found that someone had used a different method that used a JSON string as an argument rather than a file path: Google::APIClient::ClientSecrets.new(JSON.parse(ENV['GOOGLE_CLIENT_SECRETS']))

    This lets me wrap up the JSON into an ENV VAR. The world makes sense again.

提交回复
热议问题