Typescript error when trying to access more user properties in my JWT token
Hello! I am using Next Auth and I have it built so that users will also have a username, and in my auth file, my jwt callback looks like this:
Unfortunately, I am getting this TypeScript error:
After looking into it, I found that the user type is defined in the node_modules folder, and this is what both
As you can see I've tried adding username to either or, and both, but I'm still getting the same error (after a ts server refresh too) and my app also will not build because of it. Any help would be appreciated. Thank you!
Unfortunately, I am getting this TypeScript error:
Property 'username' does not exist on type 'User | AdapterUser'.After looking into it, I found that the user type is defined in the node_modules folder, and this is what both
User and AdapterUser looks like:As you can see I've tried adding username to either or, and both, but I'm still getting the same error (after a ts server refresh too) and my app also will not build because of it. Any help would be appreciated. Thank you!
