Hi, thanks a lot for the tutorial
I tried to follow the part where you teach how to integrate Next Auth with Github and Google providers.
I have the same schema in my prisma.schema for the Accout:
model Account {
id String @id @default(auto()) @map("_id") @db.ObjectId
userId String @db.ObjectId
type String
provider String
providerAccountId String
refresh_token String? @db.String
access_token String? @db.String
expires_at Int?
token_type String?
scope String?
id_token String? @db.String
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
}
And here it's my NextAuth options config:

For the Github sign in, it's throwing this error:
19 linkAccount: (data) => p.account.create({
data: {
provider: 'github',
type: 'oauth',
providerAccountId: '<ID>',
access_token: '<TOKENN>,
token_type: 'bearer',
scope: 'read:user,user:email',
~~~~~
userId: '<ID>'
}
})
Unknown arg `scope` in data.scope for type AccountUncheckedCreateInput. Did you mean `type`? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
type: String
provider: String
providerAccountId: String
refresh_token?: String | Null
access_token?: String | Null
experies_at?: Int | Null
token_type?: String | Null
id_token?: String | Null
session_state?: String | Null
}
And as for Google, it throws a similar error but with another field:
Error:
Invalid `prisma.account.create()` invocation:
{
data: {
provider: 'google',
type: 'oauth',
providerAccountId: '<ID>',
access_token: '<TOKEN>',
expires_at: 1678684284,
~~~~~~~~~~
token_type: 'Bearer',
id_token: '<TOKEN>',
userId: '<ID>'
}
}
Unknown arg `expires_at` in data.expires_at for type AccountUncheckedCreateInput. Did you mean `experies_at`? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
type: String
provider: String
providerAccountId: String
refresh_token?: String | Null
access_token?: String | Null
experies_at?: Int | Null
token_type?: String | Null
id_token?: String | Null
session_state?: String | Null
}
Am I missing something?
Thanks in advance for the help
Hi, thanks a lot for the tutorial
I tried to follow the part where you teach how to integrate Next Auth with Github and Google providers.
I have the same schema in my prisma.schema for the Accout:
And here it's my NextAuth options config:
For the Github sign in, it's throwing this error:
And as for Google, it throws a similar error but with another field:
Am I missing something?
Thanks in advance for the help