Octavi00 commented on code in PR #11812:
URL: https://github.com/apache/gravitino/pull/11812#discussion_r3576347234


##########
web-v2/web/src/lib/store/auth/index.js:
##########
@@ -144,25 +174,29 @@ export const logoutAction = createAsyncThunk(
       } catch (error) {
         console.warn('[Logout Action] Provider cleanup failed:', error)
       }
+    }
 
-      // Clear legacy auth tokens
-      localStorage.removeItem('accessToken')
-      localStorage.removeItem('authParams')
-      localStorage.removeItem('expiredIn')
-      localStorage.removeItem('version')
+    // Clear legacy auth tokens (local and session storage) after provider 
cleanup
+    localStorage.removeItem('accessToken')
+    sessionStorage.removeItem('accessToken')
 
-      dispatch(clearIntervalId())
-      dispatch(setAuthToken(''))
-    }
+    localStorage.removeItem('authParams')
+    sessionStorage.removeItem('authParams')
+
+    localStorage.removeItem('expiredIn')
+    sessionStorage.removeItem('expiredIn')
+
+    localStorage.removeItem('version')
+    sessionStorage.removeItem('version')
+
+    dispatch(clearIntervalId())
+    dispatch(setAuthToken(''))
 
     // Always clear authUser in Redux and sessionStorage on logout
     // This ensures consistent behavior for both OAuth and simple auth
     dispatch(setAuthUser(null))
     sessionStorage.removeItem('simpleAuthToken')
 
-    // Clear persisted authType to avoid stale auth mode on next visit

Review Comment:
   I removed these lines due to logout -> login issues. Basically, the page 
would need to be refreshed to rerun initAuth and reset authType now that im no 
longer pulling Auth conf in longin.js



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to