Closed bobcave closed 1 year ago
Thanks for reporting!
May I ask What db configuration you have, e.g Prisma
config?
@bobcave I just pushed some updates to the migrations. Could you try to purge your db and run the migrations again?
That solved it!!!! Thanks
I encountered an error with the NextAuth.js adapter while attempting to retrieve user information from the database during the OAuth callback handler. The error message indicates that there is an issue with the findUnique method, which is being called on an undefined object. Here's the error message:
[next-auth][error][adapter_error_getUserByAccount] https://next-auth.js.org/errors#adapter_error_getuserbyaccount Cannot read properties of undefined (reading 'findUnique') { message: "Cannot read properties of undefined (reading 'findUnique')", stack: "TypeError: Cannot read properties of undefined (reading 'findUnique')\n" + ' at getUserByAccount (/home/cueva/langchain-ui/node_modules/@next-auth/prisma-adapter/dist/index.js:11:45)\n' + ' ... This issue seems to be caused by an incorrect configuration of the adapter or an issue with the database itself.
Steps to reproduce:
Navigate to the login page Click on the login button and select the OAuth provider Enter the credentials and submit the form Encounter the error message Expected behavior: The user should be able to successfully log in using the OAuth provider.
Actual behavior: Encounter an error with the NextAuth.js adapter when attempting to retrieve user information from the database during the OAuth callback handler.
Environment:
NextAuth.js version: [insert version number here] Operating system: [insert operating system name and version here] Database: [insert database name and version here] Other relevant information: [insert any other relevant information here] Thank you for your help in resolving this issue.