tenjin-ui-kit 0.2.21 → 0.2.23

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.
@@ -55,38 +55,43 @@ var AuthenticationProvider = function AuthenticationProvider(_ref) {
55
55
  while (1) switch (_context.prev = _context.next) {
56
56
  case 0:
57
57
  token = resolveToken();
58
+ console.log("Resolved Token: ", token);
58
59
  if (!token) {
59
- _context.next = 16;
60
+ _context.next = 20;
60
61
  break;
61
62
  }
62
- _context.prev = 2;
63
- _context.next = 5;
63
+ _context.prev = 3;
64
+ console.log("Calling profile validation API");
65
+ _context.next = 7;
64
66
  return _axios.default.get("/api/me", {
65
67
  headers: {
66
68
  Authorization: "Bearer ".concat(token)
67
69
  }
68
70
  });
69
- case 5:
71
+ case 7:
70
72
  profileValidationResponse = _context.sent;
73
+ console.log("Profile validation successful");
71
74
  setLoggedInUser(profileValidationResponse.data);
72
75
  setAuthLoading(false);
73
- _context.next = 14;
76
+ _context.next = 18;
74
77
  break;
75
- case 10:
76
- _context.prev = 10;
77
- _context.t0 = _context["catch"](2);
78
+ case 13:
79
+ _context.prev = 13;
80
+ _context.t0 = _context["catch"](3);
81
+ console.error("Profile validation error");
82
+ console.error("Error: ", _context.t0);
78
83
  setLoggedInUser(null);
79
- redirectToLogin();
80
- case 14:
81
- _context.next = 17;
84
+ // redirectToLogin();
85
+ case 18:
86
+ _context.next = 21;
82
87
  break;
83
- case 16:
88
+ case 20:
84
89
  redirectToLogin();
85
- case 17:
90
+ case 21:
86
91
  case "end":
87
92
  return _context.stop();
88
93
  }
89
- }, _callee, null, [[2, 10]]);
94
+ }, _callee, null, [[3, 13]]);
90
95
  }));
91
96
  return function resolveAuthentication() {
92
97
  return _ref2.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tenjin-ui-kit",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "repository": {
5
5
  "url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
6
6
  },