feat: Implement secure email/password authentication with user registration, API rate limiting, and dynamic homepage navigation.

This commit is contained in:
Yusuf İpek
2026-02-07 06:43:09 +03:00
parent d38e8b8749
commit 5b436fff2d
11 changed files with 707 additions and 166 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
export default function AuthLayout({
import { redirect } from 'next/navigation';
import { auth } from '@/lib/auth';
export default async function AuthLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await auth();
// If already logged in, redirect to dashboard
if (session?.user) {
redirect('/dashboard');
}
return <>{children}</>;
}