mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 21:08:12 +00:00
fix(portal:auth): auth portal redirect fixed
This commit is contained in:
@@ -74,10 +74,14 @@ const App = () => {
|
|||||||
const userEmail = user?.email;
|
const userEmail = user?.email;
|
||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = () => {
|
||||||
// Best-effort server-side session invalidation; local cleanup always runs
|
|
||||||
// so a failed API call (e.g. expired token) never leaves the user stuck.
|
|
||||||
logout();
|
logout();
|
||||||
["auth-token", "refresh-token"].forEach((name) => {
|
[
|
||||||
|
"auth-token",
|
||||||
|
"refresh-token",
|
||||||
|
"auth-user",
|
||||||
|
"current-position-id",
|
||||||
|
"selected-position-id",
|
||||||
|
].forEach((name) => {
|
||||||
document.cookie = `${name}=; Max-Age=0; path=/`;
|
document.cookie = `${name}=; Max-Age=0; path=/`;
|
||||||
});
|
});
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
@@ -113,6 +117,7 @@ const App = () => {
|
|||||||
path="/admin/dropdowns"
|
path="/admin/dropdowns"
|
||||||
element={<DropdownSettingsPage />}
|
element={<DropdownSettingsPage />}
|
||||||
/>
|
/>
|
||||||
|
<Route path="/user-management" element={<Navigate to="/" replace />} />
|
||||||
<Route path="*" element={<Navigate to="/" replace />} />
|
<Route path="*" element={<Navigate to="/" replace />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ window.__USER_MANAGEMENT_BRANDING__ = {
|
|||||||
organizationName: "EDR Platform",
|
organizationName: "EDR Platform",
|
||||||
appName: "EDR Portal",
|
appName: "EDR Portal",
|
||||||
moduleBasePath: "/user-management",
|
moduleBasePath: "/user-management",
|
||||||
backToAppPath: "/dashboard",
|
backToAppPath: "/",
|
||||||
backToAppLabel: "Back to dashboard",
|
backToAppLabel: "Back to dashboard",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user