Closed mashwishi closed 5 months ago
We could not detect a valid reproduction link. Make sure to follow the bug report template carefully.
To be able to investigate, we need access to a reproduction to identify what triggered the issue. We need a link to a public GitHub repository. Example: (NextAuth.js example repository).
The bug template that you filled out has a section called "Reproduction URL", which is where you should provide the link to the reproduction.
Depending on the reason the issue was closed, you can do the following:
In general, assume that we should not go through a lengthy onboarding process at your company code only to be able to verify an issue.
In most cases, a private repo will not be a sufficient minimal reproduction, as this codebase might contain a lot of unrelated parts that would make our investigation take longer. Please do not make it public. Instead, create a new repository using the templates above, adding the relevant code to reproduce the issue. Common things to look out for:
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps by opening a new issue.
We look into every issue and monitor open issues for new comments.
However, sometimes we might miss a few due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
Adapter type
@auth/prisma-adapter
Environment
Reproduction URL
https://github.com/nextauthjs/next-auth-example/blob/main/auth.ts
Describe the issue
I'm encountering an issue with NextAuth's Prisma adapter. When attempting to use prisma.account.findUnique() with a specific where clause, I'm getting an error indicating an invalid argument provider_providerAccountId. The error message suggests using providerId_providerAccountId instead.
Here's the error message I'm receiving:
And here's my Prisma schema:
I haven't modified the Prisma schema generated by npx prisma db pull, so I believe this might be an issue related to the adapter or how NextAuth interfaces with Prisma.
Thank you for your help in resolving this issue! Let me know if you need any more information.
How to reproduce
Attempt to use google signin, Here's my auth implementation:
Expected behavior
The expected behavior would be for the Prisma adapter to recognize and accept the provider_providerAccountId argument in the where clause of the prisma.account.findUnique() invocation without throwing an error. This means that the Prisma adapter should handle queries with this argument properly and not suggest a different argument (providerId_providerAccountId) in the error message.