b0mbays / continuously_casting_dashboards

HACS Integration for continuously casting a Home Assistant dashboard to your Google Chromecast Displays
MIT License
230 stars 11 forks source link

Multiple users #49

Closed Curiosity87 closed 8 months ago

Curiosity87 commented 8 months ago

I have 3 users and we have TOTP activated.

For whatever reason I can not get it to login automatically on my nest hub.

I have trusted_proxies as well could that be the problem? Is there anyway around it? Im using a reverse proxy.

Proxies:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.18.0.0/16
    - 192.168.170.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5

Auth settings:

  external_url: "blablabla.blablabla.vip"
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.170.179/32 #IP of my Nesthub
      trusted_users:
        192.168.170.179: 32412dasdasdasdas34asdkhadjkash
      allow_bypass_login: true
    - type: homeassistant
  allowlist_external_dirs:
    - "/config/tmp/"
  auth_mfa_modules:
    - type: totp 

Any pointers?

b0mbays commented 8 months ago

Hey @Curiosity87 could you try removing the 192 IP address from your trusted_proxies list, restart and try again?

Someone else had a similar issue and this fixed it for them and kept their Cloudfare setup working. I don't think it plays nicely with the trusted users!

https://github.com/b0mbays/continuously_casting_dashboards/issues/47#issuecomment-1963099064

Curiosity87 commented 8 months ago

Tried that, but then I only get into recovery mode of HA. Happend once earlier as I was fiddeling around with settings and ended up having to restore my proxmox backup because HA forgot all my settings for some reason. :(

Im not using cloudflare tunnel. Nignx Proxy Manager and have cloudflare A record and cname.

EDIT: Same thing happened again. Have to restore from backup because almost all settings are gone.

maxakash commented 8 months ago

Tried that, but then I only get into recovery mode of HA. Happend once earlier as I was fiddeling around with settings and ended up having to restore my proxmox backup because HA forgot all my settings for some reason. :(

Im not using cloudflare tunnel. Nignx Proxy Manager and have cloudflare A record and cname.

EDIT: Same thing happened again. Have to restore from backup because almost all settings are gone.

I was facing the same issue, all I did was create a new user and use it's user_id.

b0mbays commented 8 months ago

@Curiosity87 Did you try the above? I'll close this issue if that worked 👍

Curiosity87 commented 8 months ago

Still doesn't work. Tried all different kinds of solutions but it will auto login. Might setup a DEV and try it without totp, but it will have to wait a bit!

EDIT: Just went downstairs in all of sudden its working! Thanks!

b0mbays commented 8 months ago

How strange! Glad you got it sorted