next-auth
Unanswered
Vaikruta posted this in #help-forum
VaikrutaOP
Next-auth Error "le.js:254:37) {
name: 'GetUserByAccountError',
code: undefined" while using Google Login.
I'm constantly getting the error message which says
"[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error Cannot read properties of undefined (reading 'findUnique') TypeError: Cannot read properties of undefined (reading 'findUnique')"
when i try to login with google after initialising the PrismaAdapter. If i remove the adapter, then everything works fine. I understand that the Prisma adapter is expecting something in findUnique but idk what i should do. I read in the documentation that if the user is not created next-auth creates one in the database for us(I'm using postgres). I've followed many tutorials and did exactly what they did, but I get this error while the tutorials work fine. Can anybody please help me with this? Been stuck on this for 3 days now.
name: 'GetUserByAccountError',
code: undefined" while using Google Login.
I'm constantly getting the error message which says
"[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error Cannot read properties of undefined (reading 'findUnique') TypeError: Cannot read properties of undefined (reading 'findUnique')"
when i try to login with google after initialising the PrismaAdapter. If i remove the adapter, then everything works fine. I understand that the Prisma adapter is expecting something in findUnique but idk what i should do. I read in the documentation that if the user is not created next-auth creates one in the database for us(I'm using postgres). I've followed many tutorials and did exactly what they did, but I get this error while the tutorials work fine. Can anybody please help me with this? Been stuck on this for 3 days now.