Closed thepeterkovacs closed 1 year ago
I outline the issue here, if anyone wants to fix: https://github.com/nextauthjs/next-auth/issues/8280#issuecomment-1672940275
I released a fix in @auth/core
, which is a transient dependency of @auth/*-adapter
. For it to take effect, you might need to delete node_modules
/lock file and reinstall packages.
It's included in @auth/core@0.10.4
If that doesn't work, you can check your package manager's override config, eg. for pnpm adding the following to your package.json
should fix the issue:
"pnpm": {
"overrides": {
"@auth/core": "^0.10.4"
}
}
I released a fix in
@auth/core
, which is a transient dependency of@auth/*-adapter
. For it to take effect, you might need to deletenode_modules
/lock file and reinstall packages.It's included in @auth/core@0.10.4
If that doesn't work, you can check your package manager's override config, eg. for pnpm adding the following to your
package.json
should fix the issue:"pnpm": { "overrides": { "@auth/core": "^0.10.4" } }
Hello, I'm still experiencing this problem even after installing latest version of auth/core. Attempted doing what you mentioned above with no luck.
I'm implementing a custom adapter where I have imported the types from @auth/adapters. I receive typescript errors when I pass the custom adapter via NextAuthOptions. same errors as above with some others Types of property 'linkAccount' are incompatible.
I really wish next-auth would export their adapter types that would make all of this much easier.
VV made some progress VV
Edit: I was able to side step the type error by defining the type of Adapter
as type Adapter = NextAuthOptions['adapter']
. This works becuase I'm not using the Adapter type from @auth/core. So I still think there might be a problem here.
Edit 2: @balazsorban44 just saw your comment on this issue so sorry for the extra noise https://github.com/nextauthjs/next-auth/issues/8280#issuecomment-1672940275
If you are importing types from @auth/core/adapters
, make sure it's at least the above mentioned version. Otherwise you can keep using next-auth/adapters
for your custom one.
Here is the explanation https://github.com/nextauthjs/next-auth/pull/8294
Yup, was using "@auth/core": "^0.11.1",
I don't have an export from next-auth/adapters
when using "next-auth": "^4.23.0",
Fixed via https://github.com/nextauthjs/next-auth/commit/20c3fe3331273893651c68d2e43151b4ca0c67b4, will release later. 🙏
Question 💬
While using the latest version of next-auth (4.22.5) and @auth/drizzle-adapter (0.2.1), the following error occurred in the NextAuthOptions:
Types of property 'linkAccount' are incompatible.
I've set up the minimum required adapter in Postgres according to the documentation.
Here is my code:
Any idea how to resolve this issue? Thanks in advance!
How to reproduce ☕️
Follow the documentation for setting up the drizzle adapter with Postgres: https://authjs.dev/reference/adapter/drizzle#drizzleadapter
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR