async signIn({ profile }) {
if (!profile) return false;
const DisP = profile as DiscordProfile;
const user = await Prisma.user.findUnique({
where: { discordId: DisP.id },
});
if (!user) {
console.log("CREATING USER", DisP.id);
await Prisma.user.create({
data: {
discordId: DisP.id,
email: DisP.email,
// Include other properties as needed
},
});
}
return true;
}
}
async signIn({ profile }) {
if (!profile) return false;
const DisP = profile as DiscordProfile;
const user = await Prisma.user.findUnique({
where: { discordId: DisP.id },
});
if (!user) {
console.log("CREATING USER", DisP.id);
await Prisma.user.create({
data: {
discordId: DisP.id,
email: DisP.email,
// Include other properties as needed
},
});
}
return true;
}
}