@iblai/web-utils 1.6.4 → 1.6.5

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
@@ -2874,8 +2874,9 @@ async function isDmTokenExpired(storageService) {
2874
2874
  * @returns boolean indicating if token is valid for current user
2875
2875
  */
2876
2876
  async function validateJwtToken(storageService) {
2877
+ let edxJwtToken;
2877
2878
  try {
2878
- const edxJwtToken = await storageService.getItem(LOCAL_STORAGE_KEYS.EDX_TOKEN_KEY);
2879
+ edxJwtToken = await storageService.getItem(LOCAL_STORAGE_KEYS.EDX_TOKEN_KEY);
2879
2880
  console.log("[AuthProvider] JWT token ", edxJwtToken);
2880
2881
  const userData = await storageService.getItem(LOCAL_STORAGE_KEYS.USER_DATA);
2881
2882
  if (!edxJwtToken || !userData) {
@@ -2892,7 +2893,7 @@ async function validateJwtToken(storageService) {
2892
2893
  return true;
2893
2894
  }
2894
2895
  catch (error) {
2895
- console.error("[AuthProvider] Error validating JWT token:", error);
2896
+ console.error("[AuthProvider] Error validating JWT token:", error, "Token is ", edxJwtToken);
2896
2897
  return false;
2897
2898
  }
2898
2899
  }