refactor: move auth check into pages

This commit is contained in:
Dominik 2025-05-12 21:17:46 +02:00 committed by Dominik
parent dd6b82515e
commit ddcb14e564
3 changed files with 13 additions and 18 deletions

View file

@ -7,7 +7,10 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
),
callbacks: {
authorized: async ({ auth }) => {
return !!auth;
return !!auth?.user;
},
},
pages: {
signIn: '/login',
},
});