Invalid session
-
@codecowboy try updating the database. If you are using mongodb, run this
db.objects.update({_key: "config"}, {$set: {cookieDomain: ""}});
-
@pichalite said in Invalid session:
db.objects.update({_key: "config"}, {$set: {cookieDomain: ""}}
I have now deleted that field in the database, restarted NodeBB and this solved it.
Thanks @pichalite and @julian !!!
Please tell me where to add documentation about this so that others do not experience this pain. And trust me it was real pain. I cried into my cornflakes.
I would like to understand why having the cookieDomain set breaks things and how to integrate this into the updater - perhaps this could be my first contribution to the code? Surely if having this value set is going to render a forum unusable then it should either be fixed or the field should be removed in the most recent update script?
Thanks again.
-
Honestly? The purpose of cookiedomain is to let you "genericise" the NodeBB cookie so you can read it (and its session) in another app sharing the same express secret. It's useful, but 99.999% of admins probably don't use it, and setting it can definitely cause problems.