diff --git a/src/helpers/googleOauthHelper.js b/src/helpers/googleOauthHelper.js index 095024c71be4d8731148b136f3755fb8b9dd22ba..a6ce0c891b5118f2e4b763f68cac3f06e1f7828c 100644 --- a/src/helpers/googleOauthHelper.js +++ b/src/helpers/googleOauthHelper.js @@ -9,11 +9,9 @@ const _ = require("lodash"); class GoogleOauth { constructor() { - this.googleApiKey = _.replace(envVariables.SUNBIRD_GOOGLE_SERVICE_ACCOUNT_CREDENTIAL.private_key, new RegExp("\\n", "\g"), "\n") - console.log('NEW KEY =======>', utf8.encode(this.googleApiKey)); this.auth = new google.auth.GoogleAuth({ credentials: { - "private_key": utf8.encode(this.googleApiKey), + "private_key": envVariables.SUNBIRD_GOOGLE_SERVICE_ACCOUNT_CREDENTIAL.private_key.replace(/\\n/g, '\n'), "client_email": envVariables.SUNBIRD_GOOGLE_SERVICE_ACCOUNT_CREDENTIAL.client_email }, scopes: [