From bb4a687b425a17c50651c8ba7be09ef7a0206ca9 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Mon, 7 Jul 2025 00:06:17 +0000
Subject: feat: Add a logout page

---
 apps/web/app/logout/page.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 apps/web/app/logout/page.tsx

(limited to 'apps/web/app/logout/page.tsx')

diff --git a/apps/web/app/logout/page.tsx b/apps/web/app/logout/page.tsx
new file mode 100644
index 00000000..0df28978
--- /dev/null
+++ b/apps/web/app/logout/page.tsx
@@ -0,0 +1,18 @@
+"use client";
+
+import { useEffect } from "react";
+import { useRouter } from "next/navigation";
+import { signOut } from "next-auth/react";
+
+export default function Logout() {
+  const router = useRouter();
+  useEffect(() => {
+    signOut({
+      redirect: false,
+      callbackUrl: "/",
+    }).then((d) => {
+      router.push(d.url);
+    });
+  }, []);
+  return <span />;
+}
-- 
cgit v1.2.3-70-g09d2

