chore: add cookies

This commit is contained in:
Steven
2023-11-23 20:06:42 +08:00
parent 5e227da0c4
commit a4e91541cf
6 changed files with 32 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import { authServiceClient } from "@/grpcweb";
import useWorkspaceStore from "@/stores/v1/workspace";
import { PlanType } from "@/types/proto/api/v2/subscription_service";
import { Role } from "@/types/proto/api/v2/user_service";
import { removeAccessToken } from "@/utils/auth";
import useUserStore from "../stores/v1/user";
import AboutDialog from "./AboutDialog";
import Icon from "./Icon";
@ -23,7 +24,7 @@ const Header: React.FC = () => {
const handleSignOutButtonClick = async () => {
await authServiceClient.signOut({});
document.cookie = "slash.access-token=; path=/;";
removeAccessToken();
localStorage.removeItem("userId");
window.location.href = "/auth";
};