Add Better Auth admin authentication

This commit is contained in:
2026-06-04 12:05:07 +02:00
parent 0f10bd6400
commit e660ec24aa
41 changed files with 2225 additions and 284 deletions

View File

@@ -1,12 +1,12 @@
import { redirect } from "next/navigation";
import { AuthEntry } from "@/components/auth-entry";
import { getCurrentMockSession } from "@/lib/mock-session";
import { isAuthenticated } from "@/lib/auth-server";
export default async function LoginPage() {
const session = await getCurrentMockSession();
const isSessionActive = await isAuthenticated();
if (session) {
if (isSessionActive) {
redirect("/dashboard");
}