2026-01-09 17:29:11 +07:00
|
|
|
import { NextResponse } from "next/server";
|
|
|
|
|
import { cookies } from "next/headers";
|
2026-05-11 22:43:42 -04:00
|
|
|
import { clearDashboardAuthCookie } from "@/lib/auth/dashboardSession";
|
2026-01-09 17:29:11 +07:00
|
|
|
|
|
|
|
|
export async function POST() {
|
|
|
|
|
const cookieStore = await cookies();
|
2026-05-11 22:43:42 -04:00
|
|
|
clearDashboardAuthCookie(cookieStore);
|
|
|
|
|
cookieStore.delete("oidc_state");
|
|
|
|
|
cookieStore.delete("oidc_nonce");
|
|
|
|
|
cookieStore.delete("oidc_code_verifier");
|
2026-06-26 11:36:49 +07:00
|
|
|
return NextResponse.json({ success: true }, { headers: { "Cache-Control": "no-store" } });
|
2026-01-09 17:29:11 +07:00
|
|
|
}
|