My apologies, I'm not super familiar with GCS and to make things even harder I have to ask colleagues with the proper access to generate keys and accounts and all when it comes to GC stuff, so that makes troubleshooting a bit tricky... All that to say, thank you for bearing with me. 😅
I was currently trying to use the options.crendentials like so:
options: {
credentials: JSON.parse(process.env.GCS_CREDENTIALS)
}
passing it the stringified json key from my GCS service account, which look like this:
{
"type": "service_account",
"project_id": "xxxxxx",
"private_key_id": "xxxxx",
"private_key": "-----BEGIN PRIVATE KEY-----xxxxxx",
"client_id": "xxxxxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxxxxx"
}
but looking at the snippet you just shared, it doesn't look like this is how you're supposed to do it?
I'm a bit confused though because the plugin's readme example doesn't mention the apiEndpoint or projectId options that are being used in there. Did I miss something in the docs about that? Is that enough for authentication? 🤔