feat: add credentials authentication (#1)

This commit is contained in:
Meier Lukas
2023-12-10 17:12:20 +01:00
committed by GitHub
parent 41e54d940b
commit 3cedb7fba5
53 changed files with 890 additions and 2105 deletions

View File

@@ -1,7 +1,10 @@
import { db } from "@alparr/db";
import { Button, Stack, Title } from "@mantine/core";
import { auth } from "@alparr/auth";
import { db } from "@alparr/db";
export default async function HomePage() {
const currentSession = await auth();
const users = await db.query.users.findMany();
return (
@@ -9,6 +12,11 @@ export default async function HomePage() {
<Title>Home</Title>
<Button>Test</Button>
<pre>{JSON.stringify(users)}</pre>
{currentSession && (
<span>
Currently logged in as <b>{currentSession.user.name}</b>
</span>
)}
</Stack>
);
}