@auxcode/auxta 1.3.51-beta.14 → 1.3.51-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,7 +86,8 @@ class AuxGoogleAuth {
86
86
  const { client_secret, client_id, redirect_uris } = credentials.installed;
87
87
  const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
88
88
  try {
89
- if (TOKEN.length > 0) {
89
+ code_helper_1.default.log('tes', TOKEN, status_of_step_1.default.PASSED);
90
+ if (TOKEN) {
90
91
  oAuth2Client.setCredentials(JSON.parse(TOKEN));
91
92
  this._oAuth2Client = oAuth2Client;
92
93
  return;
@@ -139,7 +140,7 @@ class AuxGoogleAuth {
139
140
  if (err)
140
141
  return console.error('Error retrieving access token', err);
141
142
  oAuth2Client.setCredentials(token);
142
- code_helper_1.default.log('tes', token, status_of_step_1.default.PASSED);
143
+ code_helper_1.default.log('tes', token.toString(), status_of_step_1.default.PASSED);
143
144
  TOKEN = token.toString();
144
145
  this._oAuth2Client = oAuth2Client;
145
146
  });
@@ -80,7 +80,8 @@ export class AuxGoogleAuth {
80
80
  const { client_secret, client_id, redirect_uris } = credentials.installed;
81
81
  const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
82
82
  try {
83
- if (TOKEN.length > 0) {
83
+ FunctionHelper.log('tes', TOKEN, StatusOfStep.PASSED);
84
+ if (TOKEN) {
84
85
  oAuth2Client.setCredentials(JSON.parse(TOKEN));
85
86
  this._oAuth2Client = oAuth2Client;
86
87
  return;
@@ -133,7 +134,7 @@ export class AuxGoogleAuth {
133
134
  if (err)
134
135
  return console.error('Error retrieving access token', err);
135
136
  oAuth2Client.setCredentials(token);
136
- FunctionHelper.log('tes', token, StatusOfStep.PASSED);
137
+ FunctionHelper.log('tes', token.toString(), StatusOfStep.PASSED);
137
138
  TOKEN = token.toString();
138
139
  this._oAuth2Client = oAuth2Client;
139
140
  });