Extending Account Table Information
Unanswered
Highlander posted this in #help-forum
HighlanderOP
Hey, I wanted to add additional information in the account table:
But the account entry doesn’t exist at that point, how could I solve this issue?
async signIn({ user, account, profile }) {
if (account?.provider === "google") {
await prisma.account.update({
where: {
provider_providerAccountId: {
provider: account.provider,
providerAccountId: account.providerAccountId
},
},
data: {
email: profile?.email as string,
image: profile?.picture as string
}
})
}
return true;
}But the account entry doesn’t exist at that point, how could I solve this issue?