Prasad P. Pawar created ATLAS-5185:
--------------------------------------
Summary: [REACT UI] Logout sets incorrect localStorage key causing
redirect to Classic UI on next login
Key: ATLAS-5185
URL: https://issues.apache.org/jira/browse/ATLAS-5185
Project: Atlas
Issue Type: Bug
Components: atlas-webui
Affects Versions: 3.0.0
Reporter: Prasad P. Pawar
Assignee: Prasad P. Pawar
Summary
When users log out from React UI, the application sets
`localStorage.setItem("atlas_ui", "v3")`, but the login redirect logic only
checks `localStorage.last_ui_load`. This mismatch causes users to be redirected
to Classic UI instead of React UI after logout and subsequent login.
Steps to Reproduce
1. Login to Atlas React UI (v3)
2. Perform any actions in React UI
3. Click Logout from React UI
4. Login again to Atlas
5. Observe which UI loads
Expected Behavior
- After logging out from React UI and logging in again, user should be
redirected to React UI (`/n3/index.html`)
- The logout action should preserve the UI preference for the next login
session
Actual Behavior
- After logging out from React UI and logging in again, user is redirected to
Classic UI (`/index.html`)
- This happens because the login redirect logic checks
`localStorage.last_ui_load`, but React UI sets `localStorage.atlas_ui` on logout
Root Cause
The login redirect logic in `dashboardv2/public/js/modules/atlasLogin.js` (line
102) checks:script
var lastUILoad = window.localStorage && window.localStorage.last_ui_load;
--
This message was sent by Atlassian Jira
(v8.20.10#820010)