migrated
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
import type { APIEvent } from "@solidjs/start/server";
|
||||
import { getCookie, getEvent, setCookie } from "vinxi/http";
|
||||
import { getEvent, clearSession } from "vinxi/http";
|
||||
import { sessionConfig } from "~/server/session-config";
|
||||
|
||||
export async function POST() {
|
||||
"use server";
|
||||
const event = getEvent()!;
|
||||
|
||||
setCookie(event, "userIDToken", "", {
|
||||
path: "/",
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
sameSite: "lax",
|
||||
maxAge: 0,
|
||||
expires: new Date(0)
|
||||
});
|
||||
// Clear Vinxi session
|
||||
await clearSession(event, sessionConfig);
|
||||
|
||||
return new Response(null, {
|
||||
status: 302,
|
||||
|
||||
Reference in New Issue
Block a user