Found this post on serverfault about this. I attempted to set the limit_conn limit to 1 but its still allowing more than one login. Trying to limit each user to a single session.
limit_conn_zone $remote_user zone=limit:10m;
server {
listen 80;
listen [::]:80;
server_name localhost;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
limit_conn limit 1;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
https://serverfault.com/questions/993936/nginx-restrict-number-of-connections-per-basic-auth-user#:~:text=1%20Answer&text=Now%20each%20user%20can%20open%20no%20more%20than%205%20simultaneous%20connections.