can not login, console log show "invalid csrf token", everything occured after upgrade nodebb version(v3.0.1 -> v3.1.4)
-
sorry, I think I need some help.
my website can not login, console log will show "invalid csrf token", like this:
Everything occured after upgrade nodebb version(v3.0.1 -> v3.1.4),
And I didn't do anything else during this period. I have been using nodebb since 2018, and I made sure to upgrade in strict accordance with the way recommended by the official documents.I tried some way that can not solve this problem:
- restore the version to v3.0.1 and v2.x;
- reboot my server machine, nginx, mongoDB;
Could someone please give me some advice?
I have use google, chatgpt, bing, github/nodebb, nodebb community to serch something useful for three days, Fail to produce substantial output. -
-
-
@ufan0 this sounds very much like a cookie domain issue. Try the below from my forum as this is an issue I encountered myself before
Invalid CSRF on dev install
I wanted to create a DEV instance of sudonix, so went ahead and registered sudonix.dev, installed NodeBB, then recovered the database. All good - apart from ...
Sudonix | A one-stop-shop for all your technology questions (sudonix.org)
-
Thank you. Through your reply, I think we met the same scene. I have never searched for anyone with the same problem as me before.
Updating cookieDomain in mongoDB, I didn't even find the relevant description in the official document, which is really amazing.
By the time I replied to this message, my site had been working normally.
I have some interesting questions about your reply:
- I have paid attention to your site sudonix.org. What does this site mainly do? I am very interested in this and have read many posts you shared.
- The log in your proposal post says Info, What configuration is this?
[API] Adding4Route (s) to `api/v3/plugins'.
Thank you again for the solution.
-
@ufan0 said in can not login, console log show "invalid csrf token", everything occured after upgrade nodebb version(v3.0.1 -> v3.1.4):
I have paid attention to your site sudonix.org. What does this site mainly do? I am very interested in this and have read many posts you shared.
Sudonix is a completely free technical resource which works on the principle of pro bono. The owner (me) has 33 years experience in information technology, and is looking to help others with technical problems that they are unable to resolve on their own.
More information can be found here at https://sudonix.org/about
The log you are referring to is just part of the output from NodeBB itself. There's nothing particular about it.
-
-