From 630dc0976ee68116d15f8aa88811dd25edcd98d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Date: Sun, 30 Jul 2023 10:05:04 -0500 Subject: [PATCH] logout --- client/src/components/Header/Header.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/components/Header/Header.jsx b/client/src/components/Header/Header.jsx index 443d3a8..fd22e3f 100755 --- a/client/src/components/Header/Header.jsx +++ b/client/src/components/Header/Header.jsx @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Link } from 'react-router-dom'; import { Button, Icon, Menu } from 'semantic-ui-react'; +import { useAuth } from 'oidc-react'; import { usePopup } from '../../lib/popup'; import Paths from '../../constants/Paths'; @@ -29,6 +30,7 @@ const Header = React.memo( onUserSettingsClick, onLogout, }) => { + const auth = useAuth(); const handleProjectSettingsClick = useCallback(() => { if (canEditProject) { onProjectSettingsClick(); @@ -38,6 +40,11 @@ const Header = React.memo( const NotificationsPopup = usePopup(NotificationsStep, POPUP_PROPS); const UserPopup = usePopup(UserStep, POPUP_PROPS); + const onFullLogout = () => { + auth.signOut(); + onLogout(); + }; + return (
{!project && ( @@ -88,7 +95,7 @@ const Header = React.memo( {user.name}