Open jeremykentbgross opened 9 years ago
I tried to recreate this case but i could not. Off the top of my head, I would suggest you try ensure that passport.session()
is called somewhere*.
And please add a return
to the first inDone(null)
in inPassport.deserializeUser
. You end up throwing an error in the following if(aUser.userName === inUsername)
should aUser
be undefined
. The error would look like this:
TypeError: Cannot read property 'userName' of undefined
I have been having issues that I thought were a browser fault where it appeared that multiple requests eventually got gave a different cookie and got a different session.
After sleeping on it it occurred to me that maybe this was because I was using the same user login on multiple devices, and multiple browsers on each of those devices, and maybe I am either somehow doing this wrong, or perhaps it isn't supported properly. So I restarted my app and logged in with the (formerly most) troublesome device+browser combination. After this restart it worked perfectly on that device which seems to confirm my suspicion.
I am wondering: do I need to keep track of multiple sessions per user myself and somehow identify all the unique devices/browsers/(and proxy routings someday as needed) they might use at the same time separately? If so, how should I do this? If not, am I doing something else wrong?
My code for handling the logins as is follows: