@vocollege/app 0.0.93 → 0.0.95

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.
@@ -307,7 +307,9 @@ var VoAuth = /** @class */ (function (_super) {
307
307
  var _this = this;
308
308
  if (forceRedirect === void 0) { forceRedirect = false; }
309
309
  if (forceLoad === void 0) { forceLoad = false; }
310
+ console.log("VoAuth.check() 1");
310
311
  this.checkConfig();
312
+ console.log("VoAuth.check() 2");
311
313
  return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
312
314
  var currentCookies, cookieName, token, error_3;
313
315
  return __generator(this, function (_a) {
@@ -328,7 +330,9 @@ var VoAuth = /** @class */ (function (_super) {
328
330
  });
329
331
  }
330
332
  }
333
+ console.log("VoAuth.check() before");
331
334
  token = this.getToken();
335
+ console.log("VoAuth.check() token", token);
332
336
  if (!token) return [3 /*break*/, 5];
333
337
  _a.label = 1;
334
338
  case 1:
@@ -9,6 +9,7 @@ var VoBase = /** @class */ (function () {
9
9
  this.configKey = key;
10
10
  }
11
11
  VoBase.prototype.checkConfig = function () {
12
+ console.log("VoBase.checkConfig() VoConfig.get", VoConfig_1.default.get);
12
13
  if (VoConfig_1.default.get.BASE_URL === "") {
13
14
  throw new Error("VoApp is not configured properly. You need to initiate it with VoApp.configure() method.");
14
15
  }
@@ -48,6 +48,7 @@ var VoRouter = /** @class */ (function () {
48
48
  };
49
49
  VoRouter.prototype.redirectToLogout = function () {
50
50
  var webUrl = [];
51
+ console.log("redirectToLogout VoConfig.get", VoConfig_1.default.get);
51
52
  if (VoConfig_1.default.get.AUTH_BASE_URL) {
52
53
  webUrl.push(VoConfig_1.default.get.AUTH_BASE_URL + "/logout");
53
54
  var redirectTo = js_cookie_1.default.get("voapp_redirectTo") || VoConfig_1.default.get.BASE_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocollege/app",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -206,7 +206,12 @@ class VoAuth extends VoBase {
206
206
  }
207
207
 
208
208
  check(forceRedirect = false, forceLoad = false): Promise<any> {
209
+ console.log("VoAuth.check() 1");
210
+
209
211
  this.checkConfig();
212
+
213
+ console.log("VoAuth.check() 2");
214
+
210
215
  return new Promise(async (resolve, reject) => {
211
216
  // VC-231 | Clear up unnecessary cookies.
212
217
  let currentCookies = JsCookies.get();
@@ -227,8 +232,12 @@ class VoAuth extends VoBase {
227
232
  }
228
233
  }
229
234
 
235
+ console.log("VoAuth.check() before");
236
+
230
237
  const token = this.getToken();
231
238
 
239
+ console.log("VoAuth.check() token", token);
240
+
232
241
  if (token) {
233
242
  try {
234
243
  this.setSession(token, forceLoad);
@@ -6,6 +6,8 @@ class VoBase {
6
6
  this.configKey = key;
7
7
  }
8
8
  checkConfig() {
9
+ console.log("VoBase.checkConfig() VoConfig.get", VoConfig.get);
10
+
9
11
  if (VoConfig.get.BASE_URL === "") {
10
12
  throw new Error(
11
13
  "VoApp is not configured properly. You need to initiate it with VoApp.configure() method."
@@ -48,6 +48,9 @@ class VoRouter {
48
48
  }
49
49
  redirectToLogout() {
50
50
  const webUrl = [];
51
+
52
+ console.log("redirectToLogout VoConfig.get", VoConfig.get);
53
+
51
54
  if (VoConfig.get.AUTH_BASE_URL) {
52
55
  webUrl.push(VoConfig.get.AUTH_BASE_URL + "/logout");
53
56
  let redirectTo = Cookies.get("voapp_redirectTo") || VoConfig.get.BASE_URL;