SPB Git
352 B · 10 lines typescript
1import { NextResponse } from "next/server";2import { getSession, revokeSession, clearSessionCookie } from "@/lib/auth";34export async function POST() {5  const s = await getSession();6  if (s) await revokeSession(s.id);7  await clearSessionCookie();8  return NextResponse.json({ ok: true }, { headers: { "Clear-Site-Data": '"cache", "storage"' } });9}10
Files · main
Menu

Theme