PrismaP
Prisma2y ago
5 replies
matsyui

Invalid `prisma.account.findUnique()` invocation:

I am having issues with the google signin redirecting me to http://localhost:3000/api/auth/error?error=AdapterError

Here's the error log:
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: PrismaClientValidationError:
Invalid `prisma.account.findUnique()` invocation:

{
  where: {
    provider_providerAccountId: {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
      providerAccountId: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
      provider: "google"
    },
?   id?: Int,
?   providerId_providerAccountId?: accountProviderIdProviderAccountIdCompoundUniqueInput,
?   AND?: accountWhereInput | accountWhereInput[],
?   OR?: accountWhereInput[],
?   NOT?: accountWhereInput | accountWhereInput[],
?   userId?: IntFilter | Int,
?   providerType?: StringFilter | String,
?   providerId?: StringFilter | String,
?   providerAccountId?: StringFilter | String,
?   refreshToken?: StringNullableFilter | String | Null,
?   accessToken?: StringNullableFilter | String | Null,
?   accessTokenExpires?: DateTimeNullableFilter | DateTime | Null,
?   createdAt?: DateTimeFilter | DateTime,
?   updatedAt?: DateTimeFilter | DateTime,
?   user?: UserRelationFilter | userWhereInput
  },
  select: {
    user: true
  }
}

Unknown argument `provider_providerAccountId`. Did you mean `providerId_providerAccountId`? Available options are marked with ?.
Solution
GitHub
Adapter type @auth/prisma-adapter Environment System: OS: Windows 11 10.0.22631 CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz Memory: 17.58 GB / 31.94 GB Binaries: Node: 18.18.2 - c:\progra...
Unknown argument `provider_providerAccountId`. Available options ar...
Was this page helpful?