Chris Baucom
07/06/2021, 7:50 PMavatar in my User model, it doesn’t seem to save. 🧵Chris Baucom
07/06/2021, 7:50 PMmodel User {
id Int @id @default(autoincrement())
name String? @db.VarChar(200)
email String @unique @db.VarChar(200)
emailVerified DateTime? @map(name: "email_verified")
username String? @unique @db.VarChar(200)
avatar String?
}
and my Google provider code in […nextauth].js
Providers.Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
profile(profile) {
const user = {
...profile,
avatar: profile.picture
}
return user // Return the profile in a shape that is different from the built-in one.
},
}),