mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
on logout use clearTokenCookies
This commit is contained in:
parent
03aa404d4f
commit
0bf8e4ba23
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import {
|
|||
UserOutlined,
|
||||
LogoutOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { clearTokenCookies } from "@/utils/cookieUtils";
|
||||
interface NavbarProps {
|
||||
userID: string | null;
|
||||
userRole: string | null;
|
||||
|
|
@ -27,7 +28,7 @@ const Navbar: React.FC<NavbarProps> = ({
|
|||
let logoutUrl = proxySettings?.PROXY_LOGOUT_URL || "";
|
||||
|
||||
const handleLogout = () => {
|
||||
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
clearTokenCookies();
|
||||
window.location.href = logoutUrl;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue