From 2827906ea9a174ec50a036d4195b830760388ca0 Mon Sep 17 00:00:00 2001 From: bicochan Date: Tue, 1 Jul 2025 15:01:26 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20common/features=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=EC=97=90=20=EB=A1=9C=EA=B7=B8=EC=95=84=EC=9B=83=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/app/api/auth/logout/route.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 apps/common/features/app/api/auth/logout/route.ts diff --git a/apps/common/features/app/api/auth/logout/route.ts b/apps/common/features/app/api/auth/logout/route.ts new file mode 100644 index 000000000..fdcc9df7c --- /dev/null +++ b/apps/common/features/app/api/auth/logout/route.ts @@ -0,0 +1,17 @@ +import { cookies } from "next/headers"; +import { NextResponse } from "next/server"; +import { + ACCESS_TOKEN, + AUTH_USER_ID, + CLAIM_NAME, + REFRESH_TOKEN, +} from "@/shared/config"; + +export async function POST() { + const cookieStore = await cookies(); + cookieStore.delete(ACCESS_TOKEN); + cookieStore.delete(REFRESH_TOKEN); + cookieStore.delete(AUTH_USER_ID); + cookieStore.delete(CLAIM_NAME); + return NextResponse.json({ message: "Logged out" }, { status: 200 }); +}