aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/web/app/logout/page.tsx18
1 files changed, 18 insertions, 0 deletions
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 />;
+}