aboutsummaryrefslogtreecommitdiffstats
path: root/components/auth/login.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/login.tsx
parent61b08abf0083f7aeb646fe588d673c72cd8b5493 (diff)
downloadkarakeep-b7fc3344e3f3c898388831dbfad084cebdd64bb3.tar.zst
Init NextAuth
Diffstat (limited to 'components/auth/login.tsx')
-rw-r--r--components/auth/login.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/components/auth/login.tsx b/components/auth/login.tsx
new file mode 100644
index 00000000..4cd55546
--- /dev/null
+++ b/components/auth/login.tsx
@@ -0,0 +1,17 @@
+"use client";
+import { signIn } from "next-auth/react";
+
+export const LoginButton = () => {
+ return (
+ <button
+ className="btn btn-primary"
+ onClick={() =>
+ signIn(undefined, {
+ callbackUrl: "/",
+ })
+ }
+ >
+ Sign in
+ </button>
+ );
+};