From 422605f7a62ae3d32573387ab45e739b497357c6 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Tue, 30 Jul 2024 23:47:29 +0900
Subject: feat(frontend): implement /logout

---
 frontend/app/routes/logout.tsx | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 frontend/app/routes/logout.tsx

(limited to 'frontend/app/routes/logout.tsx')

diff --git a/frontend/app/routes/logout.tsx b/frontend/app/routes/logout.tsx
new file mode 100644
index 0000000..f48081d
--- /dev/null
+++ b/frontend/app/routes/logout.tsx
@@ -0,0 +1,6 @@
+import type { ActionFunctionArgs } from "@remix-run/node";
+import { authenticator } from "../.server/auth";
+
+export async function action({ request }: ActionFunctionArgs) {
+  await authenticator.logout(request, { redirectTo: "/" });
+}
-- 
cgit v1.2.3-70-g09d2

