How to skip login page when there are multiple users registered, meanwhile still can authenticate user via URL?

Hi all,

I saw there is an implementation on how to skip login pages as mentioned in https://www.home-assistant.io/docs/authentication/providers/.

However, this can only be implemented on ONE user.

So how to implement skip login page when there are multiple users registered, meanwhile still can authenticate user via URL?

In simple means, by pressing this URL with login details, user could directly login into Home Assistant Home Page.

Thanks.

1 Like

Well you can set the user available to a specific IP address. Then if on a different IP address, they will get the normal logon prompt…

1 Like

This specific IP address means user device IP trying to access HA Home Page?

For example:
User Mobile App IP: 192.1.1.1

HA need set traffic available to 192.1.1.1.

Therefore user using this IP will no longer need login, right?

This is mine:

  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 127.0.0.1
        - ::1
        - 10.90.11.0/24
        - fd00::/8
        - !secret my_ipv6_network
      trusted_users:
        127.0.0.1: !secret user_id
        "::1": !secret user_id
        10.90.11.0/24: !secret user_id
        "fd00::/8": !secret user_id
        !secret trusted_user: !secret user_id
      allow_bypass_login: true
    - type: homeassistant

So anyone on the local network bypasses login and uses the specific user_id
So you can specify an ipaddress 192.1.1.1: username and then any user from that IP address will get logged in automatically.

2 Likes

Will give it a try on this.

Just curious, is possible to skip login page via long live access token method too?

Because what I think of IP somethings might change due to some unknown reasons.

I’m having trouble implementing this. Is my syntax below correct? My hassio is in a VM, on same network.

auth_providers:
  - type: trusted_networks
    trusted_networks:
      - 192.168.1.1
      - 127.0.0.1
    trusted_users:
      192.168.1.2: ce3193...
    allow_bypass_login: true
  - type: homeassistant

Try using 192.168.1.0/24 as the network. Your trusted user IP address (192.168.1.2) is currently not in your trusted networks.

1 Like

Thank you… Happy New Year!

1 Like

I have similar issues with trusted_networks auth provider and it did not want to work no matter how I tried.
Then, I found a crucial setting that clashed with this on the official page.
I am using NGINX proxy to reach my HA from outside of the network via an encrypted channel.
It turned out that once you set up an IP address for trusted_proxies it cannot be used in the trusted_networks too. They will simply not work.

So, I added my localhost IP 127.0.0.1 to the trusted proxy and removed everything else, while adding the IP address of the machine on my local network. My issue was that I wanted to have the same device to be allowed to bypass authentication.
I am using raspberry pi for HA and it has a touchscreen connected to it. So I choose 192.168.0.X/32 for trusted_networks which is the IP address of the raspberry pi itself.

I hope this helps if you face the same issue.

Hi David. Can I set up provider to allow anybody ( I mean whole internet) to automaticli login via existed user “guest” ?
I tried next config

#  auth_providers:
#    - type: trusted_networks
#      trusted_networks:
#        - 0.0.0.0/0
#      trusted_users:
#        0.0.0.0/0: airmon
#      allow_bypass_login: true
#    - type: homeassistant

but homeassistant core started in safe mode ( with red theme and noticed me - something going wrong).
Any ideas, sir?