Login failed on nodered

I installed Node-RED using Docker Compose, and I can access it via the IP address on port 1880. However, the issue is that I want authentication on the server. I created a hashed password and added it to settings.js, but it's not working as expected

 It looks like this;

adminAuth: {

type: "credentials",

users: [{

username: "admin",

password: "$2y$08$UiLPwUVDipQ7ktp0rwuncOwIfGAzeeQcDfuHWFOxbuoYKlB86D2S6",

permissions: "*"

}]

}, 

but when i enter this credintials it says login failed. I dont know where is the problem.

Can someone help me? I dont know where the problem is?

Docker-compose.yml;

Version of NodeRED;

node-red --version
Node-RED v4.0.8
Node.js v20.18.2
Linux 5.15.0-126-generic x64 LE

Did you use the hashed credential to sign in or the string used to create the hashed credential. You should be using the string.

thanks it worked. i tried to enter same hash string to log in. i didnt know that i need to enter normal pasword which i gave for creating hash password.

Now you know the purpose of hashed passwords :smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.