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
IzaanAnwar opened this issue
Nov 10, 2024
· 0 comments
Labels
adaptersChanges related to the core code concerning database adaptersbugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
And this line adapter: DrizzleAdapter(db), results in the following error: Type 'AdapterUser' is not assignable to type 'Awaitable<AdapterUser>'. Type 'AdapterUser' is missing the following properties from type 'AdapterUser': role, accessToken, isSubActive, channelId, refreshToken
How to reproduce
"@auth/drizzle-adapter": "^1.7.3", and "drizzle-orm": "^0.36.1",
The text was updated successfully, but these errors were encountered:
IzaanAnwar
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
Nov 10, 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/drizzle-adapter
Environment
Reproduction URL
https://github.com/IzaanAnwar/auth-ex/
Describe the issue
I have been getting this type error for so long and I have no clue how to fix it:
const authConfig = { adapter: DrizzleAdapter(db), session: { strategy: "jwt", }, // ........ more config }
And this line
adapter: DrizzleAdapter(db),
results in the following error:Type 'AdapterUser' is not assignable to type 'Awaitable<AdapterUser>'. Type 'AdapterUser' is missing the following properties from type 'AdapterUser': role, accessToken, isSubActive, channelId, refreshToken
How to reproduce
"@auth/drizzle-adapter": "^1.7.3", and "drizzle-orm": "^0.36.1",
declare module "next-auth" {
interface Session {
user: {
id: UserId;
role: UserRole;
accessToken: string | null;
isSubActive: boolean | null;
channelId: string | null;
refreshToken: string | null;
} & DefaultSession["user"];
}
interface User {
id: UserId;
role: UserRole;
accessToken: string | null;
isSubActive: boolean | null;
channelId: string | null;
refreshToken: string | null;
}
}
Expected behavior
Should not get any type erros.
The text was updated successfully, but these errors were encountered: