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

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.
@@ -16,7 +16,6 @@ exports.AuxGoogleAuth = void 0;
16
16
  const config_1 = require("../../auxta/configs/config");
17
17
  const puppeteer_1 = __importDefault(require("../../puppeteer/puppeteer"));
18
18
  const code_helper_1 = __importDefault(require("../helpers/code.helper"));
19
- const status_of_step_1 = __importDefault(require("../../auxta/enums/status-of.step"));
20
19
  const fs = require('fs');
21
20
  const readline = require('readline');
22
21
  const { google } = require("googleapis");
@@ -86,9 +85,8 @@ class AuxGoogleAuth {
86
85
  const { client_secret, client_id, redirect_uris } = credentials.installed;
87
86
  const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
88
87
  try {
89
- code_helper_1.default.log('tes', TOKEN, status_of_step_1.default.PASSED);
90
88
  if (TOKEN) {
91
- oAuth2Client.setCredentials(JSON.parse(TOKEN));
89
+ oAuth2Client.setCredentials(TOKEN);
92
90
  this._oAuth2Client = oAuth2Client;
93
91
  return;
94
92
  }
@@ -135,13 +133,11 @@ class AuxGoogleAuth {
135
133
  scope: SCOPES,
136
134
  });
137
135
  const code = yield this.LogIn(authUrl);
138
- code_helper_1.default.log('tes', code, status_of_step_1.default.PASSED);
139
- oAuth2Client.getToken(code, (err, token) => {
136
+ yield oAuth2Client.getToken(code, (err, token) => {
140
137
  if (err)
141
138
  return console.error('Error retrieving access token', err);
142
139
  oAuth2Client.setCredentials(token);
143
- code_helper_1.default.log('tes', token.toString(), status_of_step_1.default.PASSED);
144
- TOKEN = token.toString();
140
+ TOKEN = token;
145
141
  this._oAuth2Client = oAuth2Client;
146
142
  });
147
143
  });
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { config } from "../../auxta/configs/config";
11
11
  import puppeteer from "../../puppeteer/puppeteer";
12
12
  import FunctionHelper from "../helpers/code.helper";
13
- import StatusOfStep from "../../auxta/enums/status-of.step";
14
13
  const fs = require('fs');
15
14
  const readline = require('readline');
16
15
  const { google } = require("googleapis");
@@ -80,9 +79,8 @@ export class AuxGoogleAuth {
80
79
  const { client_secret, client_id, redirect_uris } = credentials.installed;
81
80
  const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
82
81
  try {
83
- FunctionHelper.log('tes', TOKEN, StatusOfStep.PASSED);
84
82
  if (TOKEN) {
85
- oAuth2Client.setCredentials(JSON.parse(TOKEN));
83
+ oAuth2Client.setCredentials(TOKEN);
86
84
  this._oAuth2Client = oAuth2Client;
87
85
  return;
88
86
  }
@@ -129,13 +127,11 @@ export class AuxGoogleAuth {
129
127
  scope: SCOPES,
130
128
  });
131
129
  const code = yield this.LogIn(authUrl);
132
- FunctionHelper.log('tes', code, StatusOfStep.PASSED);
133
- oAuth2Client.getToken(code, (err, token) => {
130
+ yield oAuth2Client.getToken(code, (err, token) => {
134
131
  if (err)
135
132
  return console.error('Error retrieving access token', err);
136
133
  oAuth2Client.setCredentials(token);
137
- FunctionHelper.log('tes', token.toString(), StatusOfStep.PASSED);
138
- TOKEN = token.toString();
134
+ TOKEN = token;
139
135
  this._oAuth2Client = oAuth2Client;
140
136
  });
141
137
  });