diff options
Diffstat (limited to 'packages/web/components/auth')
| -rw-r--r-- | packages/web/components/auth/login.tsx | 17 | ||||
| -rw-r--r-- | packages/web/components/auth/logout.tsx | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/packages/web/components/auth/login.tsx b/packages/web/components/auth/login.tsx new file mode 100644 index 00000000..4cd55546 --- /dev/null +++ b/packages/web/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> + ); +}; diff --git a/packages/web/components/auth/logout.tsx b/packages/web/components/auth/logout.tsx new file mode 100644 index 00000000..8d627f68 --- /dev/null +++ b/packages/web/components/auth/logout.tsx @@ -0,0 +1,17 @@ +"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> + ); +}; |
