Closed mckeever02 closed 5 years ago
client_secret should not be added to your hosting service, such as netlify. You should only need it when you build your Gatsby project
Netlify builds on deployment, and would therefore need access to the details in the client_secret in one way or another in order to successfully build.
To answer my own question for anyone that comes across this in the future. You can achieve this using .env files. See here: https://stackoverflow.com/questions/55459528/using-private-key-in-a-env-file
Thanks @mckeever02, this was the first question I had when looking into using this plugin. Great solution, breaking the credentials into separate environment variables and reading them in appropriately during build time. 👏
Is there any way to access the client_secret.json file when hosting on a service such as netlify. Obviously this file shouldn't be committed to the repo so how would you go about accessing it? Or is there another way to configure the credentials? In a .env file perhaps?