refactor: move auth check into pages
This commit is contained in:
parent
dd6b82515e
commit
ddcb14e564
3 changed files with 13 additions and 18 deletions
|
@ -7,7 +7,10 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
|
|||
),
|
||||
callbacks: {
|
||||
authorized: async ({ auth }) => {
|
||||
return !!auth;
|
||||
return !!auth?.user;
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
signIn: '/login',
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue