Files
kordonaparts/lib/auth.ts
T
2026-06-14 16:10:40 +03:00

15 lines
360 B
TypeScript

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
}
}
})