This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
refreshAccessToken is giving me an error, "Cannot read property 'user' of undefined" #4966
Labels
mongodb
@auth/mongodb-adapter
question
Ask how to do something or how something works
TypeScript
Issues relating to TypeScript
Question 馃挰
Hello, I'm following this tutorial (https://next-auth.js.org/tutorials/refresh-token-rotation) from the official documentation.
I believe this works correctly in JS, but I wanted to build my project fully in Typescript, so I changed some code. However, upon a user sign in, I receive this error:
The complete code for
[...nextauth].ts
is below. The Google OAuth is working perfectly, as well as the mongodb connection. The only errors are for thejwt
andsession
callback functions (lines 75-100)Any help would be appreciated. Thanks.
I'm using the latest version of MacOS, and I'm testing on the latest Google Chrome browser. This is a test project that is running on localhost:3000 for now.
How to reproduce 鈽曪笍
Contributing 馃檶馃徑
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered: