You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My auth flow works perfectly in my local environment (sign in -> redirect -> dashboard) which got me excited, but after I deployed the app and tried testing the login I got an error: "Try signing in with a different account."
And when I checked function log on vercel I got these printed out:
[GET] /api/auth/callback/google?state=WFZx_ZSwmn32wbLWvehiCKazS08eWoQ_fy8zpCI0qfs&code=4%2F0AX4XfWg1z1fu44-jHIVKomNz0lKOn4w_3wbyoHJ2QEIXbom5rSppBzq2Xi0wdYyrrdTx-w&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&authuser=0&prompt=none
01:59:50:69
2022-03-25T05:59:50.821Z 79b72153-c0bf-4160-8bdf-b4e0df9fff3a ERROR [next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount Cannot read property 'findUnique' of undefined {
message: "Cannot read property 'findUnique' of undefined",
stack: "TypeError: Cannot read property 'findUnique' of undefined\n" +
' at getUserByAccount (/var/task/node_modules/@next-auth/prisma-adapter/dist/index.js:11:45)\n' +
' at _callee2$ (/var/task/node_modules/next-auth/core/errors.js:315:29)\n' +
' at tryCatch (/var/task/node_modules/regenerator-runtime/runtime.js:63:40)\n' +
' at Generator.invoke [as _invoke] (/var/task/node_modules/regenerator-runtime/runtime.js:294:22)\n' +
' at Generator.next (/var/task/node_modules/regenerator-runtime/runtime.js:119:21)\n' +
' at asyncGeneratorStep (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)\n' +
' at _next (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)\n' +
' at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7\n' +
' at new Promise (<anonymous>)\n' +
' at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12',
name: 'TypeError'
}
2022-03-25T05:59:50.822Z 79b72153-c0bf-4160-8bdf-b4e0df9fff3a ERROR [next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error Cannot read property 'findUnique' of undefined TypeError: Cannot read property 'findUnique' of undefined
at getUserByAccount (/var/task/node_modules/@next-auth/prisma-adapter/dist/index.js:11:45)
at _callee2$ (/var/task/node_modules/next-auth/core/errors.js:315:29)
at tryCatch (/var/task/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/var/task/node_modules/regenerator-runtime/runtime.js:294:22)
at Generator.next (/var/task/node_modules/regenerator-runtime/runtime.js:119:21)
at asyncGeneratorStep (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
at new Promise (<anonymous>)
at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12 {
name: 'GetUserByAccountError',
code: undefined
}
Can you help resolve this? Any pointers will be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
My auth flow works perfectly in my local environment (sign in -> redirect -> dashboard) which got me excited, but after I deployed the app and tried testing the login I got an error: "Try signing in with a different account."
And when I checked function log on vercel I got these printed out:
Can you help resolve this? Any pointers will be appreciated.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions