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
adaptersChanges related to the core code concerning database adaptersbugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
When using the new "strictUndefinedChecks" prisma preview feature, NextAuth generates an error when creating a user that has attributes that are not set in the data received from the provider
Invalid value for argument `data`: explicitly `undefined` values are not allowed. {
message: '\n' +
'Invalid `prisma.user.create()` invocation:\n' +
'\n' +
'{\n' +
' data: {\n' +
' name: "Goldstein, Peter",\n' +
' email: "[email protected]",\n' +
' image: undefined,\n' +
' ~~~~~~~~~\n' +
' emailVerified: null\n' +
' }\n' +
'}\n' +
'\n' +
'Invalid value for argument `data`: explicitly `undefined` values are not allowed.',
stack: 'PrismaClientValidationError: \n' +
'Invalid `prisma.user.create()` invocation:\n' +
'\n' +
'{\n' +
' data: {\n' +
' name: "Goldstein, Peter",\n' +
' email: "[email protected]",\n' +
' image: undefined,\n' +
' ~~~~~~~~~\n' +
' emailVerified: null\n' +
' }\n' +
'}\n' +
'\n' +
'Invalid value for argument `data`: explicitly `undefined` values are not allowed.\n' +
' at Dn (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:8082)\n' +
' at e.throwValidationError (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:13383)\n' +
' at ml (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:12142)\n' +
' at dl (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:11616)\n' +
' at ml (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:12085)\n' +
' at Dr (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:9214)\n' +
' at pl (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:114:9079)\n' +
' at /Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:130:10186\n' +
' at Object.runInChildSpan (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:121:1519)\n' +
' at t._executeRequest (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:130:10165)\n' +
' at fa (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:30:5477)\n' +
' at l (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:130:9639)\n' +
' at /Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:130:9933\n' +
' at AsyncResource.runInAsyncScope (node:async_hooks:206:9)\n' +
' at /Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:130:9913\n' +
' at Object.runInChildSpan (/Users/peter.goldstein/Development/octo-source/hearst-assistant-4/node_modules/@prisma/client/runtime/library.js:121:1519)\n' +
How to reproduce
In a Prisma application, using a recent (5.20.0+) prisma engine, enable the "strictUndefinedChecks" previewFeature in the schema definition. Set something like:
Set up NextAuth with Okta (or any other provider) that has an optional attribute. In this case image
Authenticate as a user without an image
User record creation will fail
Expected behavior
In step 4, user creation should succeed
The text was updated successfully, but these errors were encountered:
petergoldstein
added
adapters
Changes related to the core code concerning database adapters
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Oct 1, 2024
adaptersChanges related to the core code concerning database adaptersbugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Adapter type
@auth/prisma-adapter
Environment
Reproduction URL
https://github.com/tbd
Describe the issue
When using the new "strictUndefinedChecks" prisma preview feature, NextAuth generates an error when creating a user that has attributes that are not set in the data received from the provider
How to reproduce
generator client {
provider = "prisma-client-js"
previewFeatures = ["strictUndefinedChecks"]
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
in the 'prisma/schema.prisma` file.
image
Expected behavior
In step 4, user creation should succeed
The text was updated successfully, but these errors were encountered: