From 3300b2d4ca4ef30041236c1d4ddc226d30dc6107 Mon Sep 17 00:00:00 2001 From: Kartheek Palla <palla.kartheekreddy@gmail.com> Date: Mon, 15 Nov 2021 18:27:59 +0530 Subject: [PATCH] Issue #SB-000 fix: api key issue --- src/helpers/googleOauthHelper.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/helpers/googleOauthHelper.js b/src/helpers/googleOauthHelper.js index 095024c..a6ce0c8 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: [ -- GitLab