Login problems after setup nodebb
-
The file is located in three different places.
I edited /var/opt/nodeBB/nodebb/bcrypt.js, restarted nodebb. The problem still exists./home/pi/node_modules/bcrypt/bcrypt.js
/var/opt/nodeBB/nodebb/node_modules/bcrypt/bcrypt.js
/var/opt/nodeBB/nodebb/bcrypt.jsWhen i tried to login as a registed user:
Invalid Csrf token
-
Did a new install and had the same problem.
But could fix it. On raspbian you have to replace bcyptjs with bcrypt and I guess that this was the reason for the problem (different hashes?!).
So be aware of the correct install routine.
In the rootpath of nodebb do the following:- "npm install"
- "npm unlink bcryptjs && npm i bcrypt" and change <require("bcryptjs")> into <require("bcrypt")> in the bcrypt.js file (adapted from https://community.nodebb.org/topic/1591/login-not-possible)
- "./nodebb setup"
- "./nodebb start"
-
The reason we use bcrpytjs is because it requires no compilation and the speed is acceptable on modern hardware. You don't want your password hashing to be super fast either due to security reasons.
You can still use bcrpytjs on raspbian but you would need to lower the bcrpyt_rounds setting from the default 12.
-
@baris said:
You can still use bcrpytjs on raspbian but you would need to lower the bcrpyt_rounds setting from the default 12.
Yeah, either lower the rounds, or if you don't mind compiling it (npm does it automatically), use
bcrypt
instead.