Next-auth prisma error
Unanswered
Mallow bee posted this in #help-forum
Mallow beeOP
Why will this code not work?
// When user logged in, log the user in the console
callbacks: {
async signIn(user, account) {
console.log(user.profile.email ?? "no email");
const findUser = await prisma.user.findUnique({
where: {
email: user.profile.email,
},
});
if (findUser) {
console.log("user already exists");
} else {
console.log("user does not exist");
}
return true;
},
},