fix: Publicly shared pages redirect to login

This commit is contained in:
Tom Moor
2024-02-28 20:23:59 -05:00
parent 0f7bae13e2
commit 6e1c38876a
3 changed files with 9 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ import SearchQuery from "~/models/SearchQuery";
import KeyboardShortcuts from "~/scenes/KeyboardShortcuts";
import { createAction } from "~/actions";
import { NavigationSection, RecentSearchesSection } from "~/actions/sections";
import env from "~/env";
import Desktop from "~/utils/Desktop";
import history from "~/utils/history";
import isCloudHosted from "~/utils/isCloudHosted";
@@ -211,6 +212,9 @@ export const logout = createAction({
icon: <LogoutIcon />,
perform: () => {
void stores.auth.logout();
if (env.OIDC_LOGOUT_URI) {
window.location.replace(env.OIDC_LOGOUT_URI);
}
},
});