feat: setup protected routes

This commit is contained in:
Dominik 2025-04-19 01:25:23 +02:00 committed by SomeCodecat
parent 77ef7038d2
commit d43c0f78b4
2 changed files with 17 additions and 1 deletions

View file

@ -3,4 +3,9 @@ import Authentik from 'next-auth/providers/authentik';
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [Authentik],
callbacks: {
authorized: async ({ auth }) => {
return !!auth;
},
},
});