feat: implement basic oauth authentication
This commit is contained in:
parent
9cfc799a9b
commit
d86c86e137
8 changed files with 120 additions and 0 deletions
20
src/app/login/page.tsx
Normal file
20
src/app/login/page.tsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { auth } from '@/auth';
|
||||
import SignIn from '@/components/user/signin-button';
|
||||
import { SignOut } from '@/components/user/signout-button';
|
||||
|
||||
export default async function Login() {
|
||||
const session = await auth();
|
||||
return (
|
||||
<div>
|
||||
<h1>Login</h1>
|
||||
{!session?.user ? (
|
||||
<SignIn></SignIn>
|
||||
) : (
|
||||
<>
|
||||
<h2>Hallo {session.user.name}</h2>
|
||||
<SignOut></SignOut>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue