SSO in ingress nginx with Github not working as expected

I am using this example to set up SSO for my ingress controller: ingress-nginx/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml at main · kubernetes/ingress-nginx · GitHub
and I am facing two issues: If I used the same hostname for both ingresses, one ingress will lose all IPs. If I switch to a different hostname, the SSO work but I can still access the service even when I am not logged in.

I tried with two public hosts on cloudflare but can still access the service with or without login. My system is an on-premise which is running on metallb ARP mode. Thanks in advanced.