import NextAuth from "next-auth" export const { handlers, auth, signIn, signOut } = NextAuth({ providers: [], callbacks: { async session({ session, user }) { if (session.user) { // Here you would normally fetch the user from the database to attach roles // session.user.role = user.role } return session } } })