Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't login with Prisma Adapter on sqlite #1166

Closed
eden6 opened this issue Jan 20, 2021 · 3 comments
Closed

Can't login with Prisma Adapter on sqlite #1166

eden6 opened this issue Jan 20, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@eden6
Copy link

eden6 commented Jan 20, 2021

Describe the bug
I get a [get_user_by_provider_account_id_error] TypeError: prisma[Account].findOne is not a function on login with GitHub provider. I get the correct profile data in the console but the user is never created in the db.
I use the same schema file than the one on Next-Auth Website.

I get that the error is related to database but migrations work.

Same GitHub secret and id work with the TypeORM adapter.

Steps to reproduce
Create a new NextJs project, install next-auth and follow the Prisma Adapter tutorial

Have a look at this repo

Expected behavior
Create a new user and session and not return a error

Screenshots or error logs
error

Thank you!

@eden6 eden6 added the bug Something isn't working label Jan 20, 2021
@simonedelmann
Copy link

simonedelmann commented Jan 20, 2021

I have the same error. This is because findOne was deprecated in Prisma 2.14 and removed in 2.15, which was released today. The 3.2.0@canary should already have a fix for this. (It will try that in a second...)

Edit: Canary build works. Try npm i next-auth@canary.

@balazsorban44
Copy link
Member

@simonedelmann is right. #881 fixed this, and is available at the canary release.

@dalalRohit
Copy link

dalalRohit commented Jan 23, 2021

Yes, next-auth is not working with @prisma/cli-2.15.0 and @prisma/client-2.15.0

Working well with @2.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants