Session callback params types are misleading #3951
Replies: 4 comments 1 reply
-
When using See the docs: https://next-auth.js.org/configuration/callbacks#session-callback If you want to augment the default |
Beta Was this translation helpful? Give feedback.
-
Sorry for the misleading issue content, I wanted to talk about |
Beta Was this translation helpful? Give feedback.
-
I see. It is slightly complicated since the existence of those properties is dependent on the Line 17 in 49e4af1 I haven't found a nice way of propagating that to the |
Beta Was this translation helpful? Give feedback.
-
Fixing in #8404 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
session
param in session callback is typed asSession
but in reality, it can also be undefined.How to reproduce ☕️
Add a session callback:
Error:
Cannot read property 'providerType' of undefined
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions