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
returndefineConfig({
...
callbacks: {asyncjwt({ token, user }){if(user){token.id=user.id;token.myField="foo";}returntoken;},session({ session, token }){session.user.id=token.idasstring;session.user.myField=token.myFieldasstring;// typescript says: "Property 'myField' does not exist on type 'AdapterUser & User'"returnsession;},},});
Typescript throws the type error: Property 'myField' does not exist on type 'AdapterUser & User'
The text was updated successfully, but these errors were encountered:
Is it possible to include arbitrary fields in the user interface as documented here?
https://authjs.dev/getting-started/typescript#module-augmentation
My attempt:
env.d.ts
auth.config.ts
Typescript throws the type error:
Property 'myField' does not exist on type 'AdapterUser & User'
The text was updated successfully, but these errors were encountered: