사용자 로그인, 가입 처리
CI / test (push) Successful in 3m40s
CI / pr_and_merge (push) Successful in 1m8s

This commit is contained in:
2025-11-30 23:08:38 +09:00
parent 25162e4c12
commit 64e4a59244
82 changed files with 2817 additions and 28 deletions
+19
View File
@@ -0,0 +1,19 @@
import { NextResponse } from "next/server";
// /api/auth/logout
// - 클라이언트의 pb_access 세션 쿠키를 제거해 로그아웃을 수행한다.
export async function POST(_request: Request) {
const res = NextResponse.json({ message: "로그아웃 되었습니다." }, { status: 200 });
// pb_access 쿠키를 즉시 만료시켜 로그아웃 상태로 만든다.
res.cookies.set("pb_access", "", {
httpOnly: true,
secure: true,
sameSite: "lax",
path: "/",
maxAge: 0,
});
return res;
}