Foxnouns.NET/Foxnouns.Frontend/app/routes/auth.log-out/route.tsx

13 lines
331 B
TypeScript
Raw Normal View History

2024-09-10 20:33:22 +02:00
import { ActionFunction } from "@remix-run/node";
import { writeCookie } from "~/lib/request.server";
import { tokenCookieName } from "~/lib/utils";
2024-09-10 20:33:22 +02:00
export const action: ActionFunction = async () => {
return new Response(null, {
headers: {
"Set-Cookie": writeCookie(tokenCookieName, "token", 0),
2024-09-10 20:33:22 +02:00
},
status: 204,
});
};