first commit
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user