Auto Auth for kibana visualization using Nginx not working

Hi im trying to use nginx to auto authenticate in kibana shared visualizations and it isnt working.

Im on a centos 8, installed nginx, installed httpd-tools ,I create a folder called: sites-available, with a filed called: default on it, wich contains this code:

server {
listen 80;
    server_name _;
    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;

    location / {
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

}

Created a user and a password with this commands

sudo sh -c "echo -n 'sammy:' >> /etc/nginx/.htpasswd"

sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"

In my kibana.yml I have this line:

server.host: "localhost"

started nginx, load the shared visualization in browser, but the login page keeps on showing. what Im doing wrong?