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.
The issue is that the ID in the users table is not created when logging in. The session is kind of started, but the user is never created in the local db for some reason.
When I change the ID to Integer and autoincremenet the authentication works. But I know this will break other stuff.
Now auth.ts complains that the userstable has int but should have text.
![Screenshot 2024-06-10 at 11 53 25](https://github.com/nextauthjs/next-auth/assets/18461079/7adb08be-ccf7-4cf7-a4e4-494d21933ddd)
Turned on debugging in nexauth options and is getting the same error both with discord and google providers. Both are getting the users, but creating database entry fails with no userid beeing updated.
How to reproduce
Create T3 app with sqlite and drizzle, set up basic client id, secret and callback for Discord and Google.
Expected behavior
User beeing created in db, and login succeded
The text was updated successfully, but these errors were encountered:
ZzyzxIsAlreadyTaken
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
Jun 9, 2024
Yeah mbilenko-florio has the fix. I reported it in T3 aswell. The error is the same with some other adapters, and with similar solutions. My github and databse schema should be updated with the solution.
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/drizzle-adapter
Environment
System:
OS: macOS 14.5
CPU: (12) arm64 Apple M2 Max
Memory: 53.95 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
Browsers:
Chrome: 125.0.6422.142
Safari: 17.5
npmPackages:
@auth/drizzle-adapter: ^1.1.0 => 1.2.0
next: ^14.2.1 => 14.2.3
next-auth: ^4.24.7 => 4.24.7
react: ^18.3.0 => 18.3.1
Reproduction URL
https://github.com/ZzyzxIsAlreadyTaken/monthly
Describe the issue
[next-auth][debug][adapter_getUserByEmail] { args: [ '[email protected]' ] }
[next-auth][debug][adapter_createUser] {
args: [
{
name: 'someusername',
email: '[email protected]',
image: 'https://cdn.discordapp.com/embed/avatars/0.png',
emailVerified: null
}
]
}
[next-auth][error][adapter_error_createUser]
https://next-auth.js.org/errors#adapter_error_createuser NOT NULL constraint failed: monthly_user.id {
message: 'NOT NULL constraint failed: monthly_user.id',
Also getting this:
Turned on debugging in nexauth options and is getting the same error both with discord and google providers. Both are getting the users, but creating database entry fails with no userid beeing updated.
How to reproduce
Create T3 app with sqlite and drizzle, set up basic client id, secret and callback for Discord and Google.
Expected behavior
User beeing created in db, and login succeded
The text was updated successfully, but these errors were encountered: