You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module doesn't except credentials for authentication only keyfilename this can be fixed by adding
options.credentials = options.credentials || process.env.GCS_Credentials || null; on line 23
and
if(options.keyFilename != null){
try{
this.gcStorage = new Storage({
projectId: options.projectId,
credentials: options.keyFilename
});
}catch(error){
console.log(error);
}
}else if(options.credentials != null){
try{
this.gcStorage = new Storage({
projectId: options.projectId,
credentials: options.credentials
});
}catch(error){
console.log(error);
}
} or something similar to this starting on line 37
I ran into this issue trying to host an app on Heroku. Without this added if the user inputs google credentials (client_email, and private_key) and not the keyfilename the google-auth-library module looks to the environment to get GOOGLE_APPLICATION_CREDENTIALS and returns an error saying that the it was unable to load default credentials, pretty much ignoring the client email, and private_key credentials. I have had no luck trying to add my google auth json file as a config var to Heroku and found that this is an alternative solution.
The text was updated successfully, but these errors were encountered:
This module doesn't except credentials for authentication only keyfilename this can be fixed by adding
options.credentials = options.credentials || process.env.GCS_Credentials || null; on line 23
and
if(options.keyFilename != null){
try{
this.gcStorage = new Storage({
projectId: options.projectId,
credentials: options.keyFilename
});
}catch(error){
console.log(error);
}
}else if(options.credentials != null){
try{
this.gcStorage = new Storage({
projectId: options.projectId,
credentials: options.credentials
});
}catch(error){
console.log(error);
}
} or something similar to this starting on line 37
I ran into this issue trying to host an app on Heroku. Without this added if the user inputs google credentials (client_email, and private_key) and not the keyfilename the google-auth-library module looks to the environment to get GOOGLE_APPLICATION_CREDENTIALS and returns an error saying that the it was unable to load default credentials, pretty much ignoring the client email, and private_key credentials. I have had no luck trying to add my google auth json file as a config var to Heroku and found that this is an alternative solution.
The text was updated successfully, but these errors were encountered: