@iblai/web-utils 1.2.12 → 1.2.13
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
|
@@ -750,7 +750,7 @@ const LOCAL_STORAGE_KEYS = {
|
|
|
750
750
|
USER_DATA: "userData",
|
|
751
751
|
USER_TENANTS: "tenants",
|
|
752
752
|
EDX_TOKEN_KEY: "edx_jwt_token",
|
|
753
|
-
DM_TOKEN_KEY: "
|
|
753
|
+
DM_TOKEN_KEY: "dm_token",
|
|
754
754
|
DM_TOKEN_EXPIRES: "dm_token_expires",
|
|
755
755
|
};
|
|
756
756
|
const TOOLS = {
|
|
@@ -3012,9 +3012,9 @@ function useAuthProvider({ middleware = new Map(), onAuthSuccess, onAuthFailure,
|
|
|
3012
3012
|
// Check JWT token expiry and force logout for protected routes
|
|
3013
3013
|
if (isProtectedRoute && storageService) {
|
|
3014
3014
|
const dmTokenInLocalStorage = await storageService.getItem(LOCAL_STORAGE_KEYS.DM_TOKEN_KEY);
|
|
3015
|
+
console.log('[auth-redirect] local storage keys ', LOCAL_STORAGE_KEYS);
|
|
3015
3016
|
const dmTokenExpired = await isDmTokenExpired(storageService);
|
|
3016
3017
|
if (!dmTokenInLocalStorage || dmTokenExpired) {
|
|
3017
|
-
console.log();
|
|
3018
3018
|
if (!!dmTokenInLocalStorage) {
|
|
3019
3019
|
console.log("[auth-redirect] DM token doesn't exists");
|
|
3020
3020
|
}
|