first commit

This commit is contained in:
2025-10-06 19:22:47 +02:00
commit aecc4cf549
75 changed files with 9303 additions and 0 deletions

21
src/auth.config.ts Normal file
View File

@@ -0,0 +1,21 @@
import type { NextAuthConfig } from 'next-auth';
export const authConfig = {
pages: {
signIn: '/login',
},
callbacks: {
authorized({ auth, request: { nextUrl } }) {
const isLoggedIn = !!auth?.user;
const isOnAdminRoute = nextUrl.pathname.startsWith('/admin');
if (isOnAdminRoute) {
if (isLoggedIn) return true;
return false;
}
return true;
},
},
providers: [],
} satisfies NextAuthConfig;