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

message: "Cannot read property 'id' of undefined", :( #568

Open
quang709 opened this issue Apr 25, 2022 · 1 comment
Open

message: "Cannot read property 'id' of undefined", :( #568

quang709 opened this issue Apr 25, 2022 · 1 comment

Comments

@quang709
Copy link

[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error Cannot read property 'id' of undefined {
message: "Cannot read property 'id' of undefined",
stack: "TypeError: Cannot read property 'id' of undefined\n" +
' at Object.jwt (webpack-internal:///(api)/./pages/api/auth/[...nextauth].ts:43:38)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:95:5)\n' +
' at async Object.callback (D:\next.js strapi v3\frontend\node_modules\next-auth\core\routes\callback.js:133:25)\n' +
' at async NextAuthHandler (D:\next.js strapi v3\frontend\node_modules\next-auth\core\index.js:139:28)\n' +
' at async NextAuthNextHandler (D:\next.js strapi v3\frontend\node_modules\next-auth\next\index.js:21:19)\n' +
' at async Object.apiResolver (D:\next.js strapi v3\frontend\node_modules\next\dist\server\api-utils\node.js:184:9)\n' +
' at async DevServer.runApi (D:\next.js strapi v3\frontend\node_modules\next\dist\server\next-server.js:397:9)\n' +
' at async Object.fn (D:\next.js strapi v3\frontend\node_modules\next\dist\server\base-server.js:473:37)\n' +
' at async Router.execute (D:\next.js strapi v3\frontend\node_modules\next\dist\server\router.js:233:32)\n' +
' at async DevServer.run (D:\next.js strapi v3\frontend\node_modules\next\dist\server\base-server.js:583:29)',
name: 'TypeError'
}

@nathan995
Copy link

Enabling Google (any provider you enabled for NextAuth) under Strapi solves this issue. Configure Strapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants