aboutsummaryrefslogtreecommitdiffstats
path: root/components/auth/logout.tsx
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-05 17:07:32 +0000
committerMohamedBassem <me@mbassem.com>2024-02-05 17:07:32 +0000
commitb7fc3344e3f3c898388831dbfad084cebdd64bb3 (patch)
treed3f5e282ad2edb001120665d3244cd623ec3e888 /components/auth/logout.tsx
parent61b08abf0083f7aeb646fe588d673c72cd8b5493 (diff)
downloadkarakeep-b7fc3344e3f3c898388831dbfad084cebdd64bb3.tar.zst
Init NextAuth
Diffstat (limited to 'components/auth/logout.tsx')
-rw-r--r--components/auth/logout.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/auth/logout.tsx b/components/auth/logout.tsx
new file mode 100644
index 00000000..87391c84
--- /dev/null
+++ b/components/auth/logout.tsx
@@ -0,0 +1,12 @@
+"use client";
+import { signOut } from "next-auth/react";
+
+export const LogoutButton = () => {
+ return (
+ <button className="btn btn-ghost normal-case" onClick={() => signOut({
+ callbackUrl: "/",
+ })}>
+ Sign Out
+ </button>
+ );
+};