261102_01_ENH: 프로젝트 접근 권한 확인 및 탭별 선택 상태 분리, 공용 인증 쿠키 설정

This commit is contained in:
2026-11-02 15:14:08 +09:00
parent 4bfa2af213
commit 69939f8d2b
18 changed files with 336 additions and 53 deletions

View File

@@ -1,6 +1,5 @@
import { NextResponse } from "next/server";
import { serverEnv } from "@/lib/env.server";
import { CookieKeys } from "@/store/cookie/cookie-keys";
import { setAuthCookie } from "@/lib/auth-cookie";
/** Stateless backend authentication has no logout API; discard the frontend session cookie. */
export async function POST() {
@@ -8,12 +7,6 @@ export async function POST() {
{ ok: true },
{ headers: { "Cache-Control": "no-store" } },
);
response.cookies.set(CookieKeys.AuthToken, "", {
httpOnly: true,
secure: ["prod", "production"].includes(serverEnv.ENV),
sameSite: "lax",
path: "/",
maxAge: 0,
});
setAuthCookie(response, "");
return response;
}