I suspect this may be a difference between the maintenance of the server/client sessions. When you restart your server, the authentication session should be lost, so I would expect the undefined.
As for the log you're seeing, I can't explain that off the top of my head. I'd expect you to be prompted again for authentication
Thank you for you reply and help.
That's right, I've done the steps again and the same thing happens.
Just to say that my address is to the editor, I have to adjust my nginx to redirect to the dashboard, but I still can't do it. If I enter directly to the dashboard 192.168.130.12:1880/dashboard/page1 it doesn't ask me for authentication and the console says:
node-red-dashboard-2-basic-auth: Session is not authenticated by Basic Auth; no user detected.
server {
listen 80;
listen [::]:80;
server_name 192.168.130.12;
location / {
auth_basic "Dashboard";
auth_basic_user_file /etc/nginx/htpasswd;
proxy_set_header X-Forwarded-User $remote_user;
proxy_pass http://192.168.130.12:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
}
After further testing and checking, it seems that there was some conflict with flowfuse/node-red-dashboard-2-user-addon. I had both installed, uninstalled it and tested again and now it works after rebooting.