Add auth demo

This commit is contained in:
Aaron Po
2026-03-12 13:31:08 -04:00
parent 95b9d7d52a
commit bb21ce3755
37 changed files with 5802 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { redirect } from "react-router";
import { destroySession, getSession } from "../lib/auth.server";
import type { Route } from "./+types/logout";
export async function loader({ request }: Route.LoaderArgs) {
const session = await getSession(request);
return redirect("/", {
headers: { "Set-Cookie": await destroySession(session) },
});
}