login error

General Discussion
  • Hello,

    I have a newly installed nodebb since the old had lots of problems. This time I was using redis instead of mongodb. After installation I did run ./nodebb setup I have configured everything in there I start the nodebb. When I try to login with my admin account which was configured at the setup stage I get the following error in console.

       Error: invalid csrf token
         at verifytoken (/NodeBB/node_modules/csurf/index.js:234:13)
         at csrf (/NodeBB/node_modules/csurf/index.js:94:7)
         at Layer.handle [as handle_request] (/NodeBB/node_modules/express/lib/router/layer.js:76:5)
         at trim_prefix (/NodeBB/node_modules/express/lib/router/index.js:263:13)
         at /NodeBB/node_modules/express/lib/router/index.js:230:9
         at Function.proto.process_params (/NodeBB/node_modules/express/lib/router/index.js:305:12)
         at /NodeBB/node_modules/express/lib/router/index.js:221:12
         at Function.match_layer (/NodeBB/node_modules/express/lib/router/index.js:288:3)
         at next (/NodeBB/node_modules/express/lib/router/index.js:182:10)
         at multipart (/NodeBB/node_modules/connect-multiparty/index.js:42:27)
    

    is there anyone who can help me figure this out?

  • apparently this error is caused by the cookies which are saved in the browser. Ones I cleared the cache and cookies I was able to login with no issue.


Suggested Topics


  • 0 Votes
    2 Posts
    118 Views

    Not right now, unless somebody's written a plugin. However it can be done fairly easily with this npm package.

  • 0 Votes
    3 Posts
    158 Views

    I see. Thank you

  • Error on image uploads

    General Discussion
    0 Votes
    10 Posts
    736 Views

    Really quickly: The NodeBB folks favor Ubuntu. The CentOS guide you linked is pretty dated, as evidenced by some now defunct links. I did not use that one so cannot speak to it. It may perhaps be more expedient to move what you have to some backup dir and do over following Scott's guide. I know that works. Moreover, Centos 7 default repos bundle really dated packages. Recommend you set up nodejs and nginx repos if not already.

    If you have gui access on that box, I would be curious as to what happens if you bypass the proxy and jack straight into NodeBB on port 4567? If not and you want to try this from an external network, I recommend configuring firewall such that only YOUR ip is allowed to hit that port.

    If it then works, then something is amiss with nginx config (wh/I do not have time to review just now.). If not, then more likely NodeBB conf issue.

  • 0 Votes
    7 Posts
    3k Views

    @julian
    You are the man that did it.
    And thank you for the github refresher I will make sure to make notations for future updates..

  • 1 Votes
    12 Posts
    4k Views

    Actually, as I messed with my NodeBB's installation and broke it, I just cloned it from the repo and then it worked 🙂