feat: Add logout for oidc (#2840)
* add oidc logout route, button in menu * removed old comments * use local storage to trigger signout in other tabs * refactored to make use useEffect * cleaned up comments * fix remove event listener * moved remove leftover storage variable to beginning of usemount Co-authored-by: Michael Andersen <Michael.Andersen@rmp.uhn.ca>
This commit is contained in:
1 parent
e401358887
commit
1d47f31738
7 files changed
+119
-46
No files matched your search
@@ -148,6 +148,16 @@ function ViewerLayout({
|
||||
},
|
||||
];
|
||||
|
||||
if (appConfig.oidc) {
|
||||
menuOptions.push({
|
||||
title: t('Header:Logout'),
|
||||
icon: 'power-off',
|
||||
onClick: async () => {
|
||||
navigate(`/logout?redirect_uri=${encodeURIComponent(window.location.href)}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set body classes (tailwindcss) that don't allow vertical
|
||||
* or horizontal overflow (no scrolling). Also guarantee window
|
||||
|
||||
Reference in new issue
Block a user