Next-Auth
Unanswered
Maltese posted this in #help-forum
MalteseOP
Why even after I check for !Session, there is a chance the user to be undefine? I tried searching the docs, but didn't find a lot of info.
4 Replies
MalteseOP
I want to know, how its possible to session exist but without a user in it?
Norwegian Forest Cat
It is an error detected by your IDE. In theory, there isn’t a problem, but your IDE checks whether any parent of the email variable could possibly be null. If so, it flags it as an issue. In your case, the user variable isn't being checked, so the IDE detects it as a potential problem.
@Norwegian Forest Cat It is an error detected by your IDE. In theory, there isn’t a problem, but your IDE checks whether any parent of the email variable could possibly be null. If so, it flags it as an issue. In your case, the user variable isn't being checked, so the IDE detects it as a potential problem.
MalteseOP
sorry, but you didn't understand. My question is, why user can be undefine when session is define
I understand why I should check the session, but the user obj...