feat: shared login with session cookie

This commit is contained in:
opencode committed 2026-10-18 10:29:32 +02:00
1 parent 159b549bf7
commit 73295653ee
8 files changed
+215 -9

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { NextResponse } from "next/server";
import { SESSION_COOKIE } from "../../../../lib/auth";
export async function POST() {
const res = NextResponse.json({ ok: true });
res.cookies.set(SESSION_COOKIE, "", { path: "/", maxAge: 0 });
return res;
}
export async function GET(req: Request) {
const res = NextResponse.redirect(new URL("/login", req.url));
res.cookies.set(SESSION_COOKIE, "", { path: "/", maxAge: 0 });
return res;
}