mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +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 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();
|
||||
["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=/`;
|
||||
});
|
||||
localStorage.clear();
|
||||
@@ -113,6 +117,7 @@ const App = () => {
|
||||
path="/admin/dropdowns"
|
||||
element={<DropdownSettingsPage />}
|
||||
/>
|
||||
<Route path="/user-management" element={<Navigate to="/" replace />} />
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
</DashboardLayout>
|
||||
|
||||
@@ -50,7 +50,7 @@ window.__USER_MANAGEMENT_BRANDING__ = {
|
||||
organizationName: "EDR Platform",
|
||||
appName: "EDR Portal",
|
||||
moduleBasePath: "/user-management",
|
||||
backToAppPath: "/dashboard",
|
||||
backToAppPath: "/",
|
||||
backToAppLabel: "Back to dashboard",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user