react-token-manager 1.0.8 → 1.0.9

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.
package/dist/index.js CHANGED
@@ -119,6 +119,7 @@ var TokenManager = class {
119
119
  */
120
120
  isExpired(token) {
121
121
  const tokenToCheck = token != null ? token : this.getOne("access_token");
122
+ console.log("tokenToCheck", tokenToCheck);
122
123
  if (!tokenToCheck) return true;
123
124
  try {
124
125
  const decoded = this.decode(tokenToCheck);
package/dist/index.mjs CHANGED
@@ -81,6 +81,7 @@ var TokenManager = class {
81
81
  */
82
82
  isExpired(token) {
83
83
  const tokenToCheck = token != null ? token : this.getOne("access_token");
84
+ console.log("tokenToCheck", tokenToCheck);
84
85
  if (!tokenToCheck) return true;
85
86
  try {
86
87
  const decoded = this.decode(tokenToCheck);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-token-manager",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A simple React library to manage JWT tokens",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/core.ts CHANGED
@@ -107,7 +107,10 @@ export class TokenManager {
107
107
  */
108
108
  isExpired(token?: string): boolean {
109
109
  // Use provided token, fallback to stored 'access_token'
110
- const tokenToCheck = token ?? this.getOne('access_token')
110
+ const tokenToCheck = token ?? this.getOne('access_token');
111
+
112
+ console.log('tokenToCheck', tokenToCheck);
113
+
111
114
 
112
115
  // If no token, consider it expired
113
116
  if (!tokenToCheck) return true