SenseTecnic / node-red-contrib-users

A node used to quickly build a simple user system to control access to your http nodes on Node-RED.
15 stars 12 forks source link

Can't create a user permanently. #1

Closed MachEleven closed 4 years ago

MachEleven commented 6 years ago

I'm using Node-Red v0.18.7. I tried out node-red-contrib-users with the "Example flow" provided on the README.md. I tried the below senario couple of times. I try to create a user with "admin" scope. Although initially it seems to be created in the white list at the user config tab, it gets lost after a browser refresh. "IsLoggedIn" node doesn't recognize the username and password after trying them out at the login page at "/demo" endpoint. "IsLoggedIn" node gives an Unauthorized error.

Then I set the Base URL path to "/users" from the advanced settings of user config tab. I try the same username and password at the login page at "/users" endpoint. This time username & password is recognized and I can log in. However on the resulting page the "username" and "scope" is empty though as I stated previously scope's been created as "admin". Please find the image below. image

I would prefer not to post this as an issue but a question since above stated may be the result of my own misusage of the node. I couldn't find a proper channel to ask for questions related to the node. I apologize in advance if this is an inconvenience.

kominami commented 6 years ago

I have the same Issue.

LucasBarrocal commented 6 years ago

I'm having trouble on storing my created users.

Every time I logout or close my node-red tab on the browser, all my storage of users and even the advanced settings gets lost, I can't access my login accounts. Is there a fix to this problem, maybe a file to secure this data?

JaimeRMNeto commented 6 years ago

I'm having the same problem here, if i enable the NodeRED security all users disappear when the browser window is closed. Please someone can help us?

dalgatatar commented 5 years ago

same!

solvisit commented 5 years ago

There is an error in nodes/users_config.html:

error: $.getJSON('/credentials/users_config/'+globalUserConfigNode.id, function (data) { correction: $.getJSON('credentials/users_config/'+globalUserConfigNode.id, function (data) {

solvisit commented 5 years ago

Another important thing to do is:

npm install body-parser

and add in users.js at line 116

var bodyParser = require('body-parser');

app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true }));

tedhuang commented 4 years ago

Apologies for the extreme delay on this reply. Thank you for the suggestions. The fix has been applied in the latest NPM version.