Solved in 0.91 - Workaround to skip authentication default user on trusted network / Trusted network without authentication

No such way.

I suppose I could try to edit the CSS, perhaps as a theme? Do you think that would work?

Couldn’t you also run a VNC Server on start?

Not sure how that would help?

Sorry, missed the inkognito mode.
But without it you could save the login and refresh the Browser on UI changes.

Thanks for the idea, but this is a wall mounted display with no user input. I could VNC in to click the button, but for the 10 displays I’m running this would be impracticable, plus I run incognito to avoid chrome asking to restore my last pages, etc.

I’m thinking I should be able to “break” the code which shows the “save my login” to stop it showing.

I.E. Diable home-assistant-polymer/src/dialogs/ ha-store-auth-card.js

If I can use a .js file to look for and then resize “ha-store-auth-card” to 1x1 pixels, it would achieve my problem. I could even link it to the autologin wall display user to only use that “theme”, so other users will still see the box.

I’m starting chrome from a script with sed commands to avoid this.

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/google-chrome/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' ~/.config/google-chrome/Default/Preferences
rm -r ~/.cache/google-chrome
gnome-terminal -x google-chrome --kiosk http://192.168.77.67:8123/lovelace/tpad_home

maybe one problem less.

1 Like

Nice, might give that a go :slight_smile:
My current:

start_chromium: /usr/bin/sudo -u pi DISPLAY=":0.0" chromium-browser --incognito --allow-insecure-localhost --noerrdialogs --disable-infobars --start-fullscreen --force-device-scale-factor={{ states.sensor.chrome_zoom_value.state }} "https://localhost/"

Ah, this only works until I restart home assistant, then it asks for the password again. Perhaps I need to automate pressing the “not now” button…

Final answer?

Since introducing this authentication system I’ve seen several posts flat out telling people who asked that there was no way to skip the login. Now with 0.91 we can skip the login only to save the login?

Personally I don’t trust anyone other than myself to handle authentication with any services that allow anything publicly into my home and have decided to secure my network as I see fit. While I understand the need for security for 90% of the users deploying home-assistant, its always been a bit of an annoyance to have to login twice with any type of SSO. Are there at least any plans or discussions around disabling a dialogue to save a login that is being bypassed?

Final answer: you cannot skip “Save Login” dialog in current release.

Pull Request is welcome if you want such feature.

1 Like

If I had the skills that I would definitely do pull request to enable an option to hide the dialogue.

My temporary fix is to use xdtools to automatically move the mouse and click the dialogue.

There are two input field we still missed from login form, “language” and “save login or not”, ask user to save the token after success login is unintuitive.

In my particular setup this is a non interactive wall display. Chrome is running in incognito mode. There are no user input devices.

Any future ability to turn off the login dialogue box would be ideally done at a user level or at a trusted login Neville, to give fine granular control over which users will see that dialogue and when

I have a similar situation with a non-interactive AppleTV browser (compiled from github.com/jvanakker/tvOSBrowser). Just putting in another vote for hiding the “Do you want to save this login?” dialog when logging in via

allow_bypass_login: true

Unfortunately the tvOSBrowser has no way to answer the question, but other than that displays the Lovelace cards properly. Appreciate all the hard work that has gone into this beast!

Did anyone magaged to solve this?

@fich I ended up using a different interface (Tileboard) for both my interactive and display-only dashboards that ended up being more ‘tweakable’ as well as allowing for auto-login through setting an authToken. Tileboard also allowed me to use older Ipads (gen2/ios9), which don’t work with Lovelace. The downside is learning how to configure the interface, but the config.example.js was a good starting point and there are plenty of tips in the forum (perhaps too many - more than 3,000 comments!). Also be careful to avoid exposing the authToken to the internet (e.g. use Caddy to reverse-proxy, which can exclude/include paths as required).

Actally, I use Tileboard, but have an Iframe with atom-calendar-card, and that one needed authentication… And use it as screen-saver on android-TV

I did solve it in the end, by loading the page in a browser and very, very, slowly find out how many tabs was needed to finally hit the button. Thanks that it is only needed once… :slight_smile:

But agree Tileboard is the best, have it on all my screens at home and one day I might just fix it so there is a calendar showing more than one event…

Boom, fixed it! I’m showing the HA page on a RPi with Raspbian Lite, (HA itselfs runs on a different system).

I’m running a command which moves the mouse and clicks the button!

Running this command (for 1920x1080 screens):

export XAUTHORITY=/home/USERNAME/.Xauthority; export DISPLAY=:0; xdotool mousemove 960 463; xdotool sleep 2; xdotool click 1

Run this command e.g. 3 minutes after booting, and you’ll be logged in automaticcaly! You can even use this command to ‘click’ the ‘Save Login’ in the lower right corner (anoying on kiosk browsers).

Works like a charm!!!

EDIT 7 APRIL 2021:
Looks like the button has moved now. Please change the mouse coordinates to: 960 410

thus:

export XAUTHORITY=/home/USERNAME/.Xauthority; export DISPLAY=:0; xdotool mousemove 960 410; xdotool sleep 2; xdotool click 1
3 Likes

I’m running HA in incognito kiosk-mode on Chromium on a 1920x1200 touchscreen.
I use the following script to login to HA, save the login, disable the sidebar in the user settings and then select a view from the side-panel (“show frame tab” - specific for my setup).
Because of different screen resolutions, HA version, view tabs (at the top of the screen) etc this will probably not work perfectly for everyone but I thought I share it anyway.

To get the current mouse coordinates, instead of trial & error:

export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool getmouselocation;

My current script (/home/pi/ha_startup.sh) :

# login to HA
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool type GuestUser
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool key Tab
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool type GuestPass
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool key Return
sleep 5;

# click save login-button
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool mousemove 1835 1030;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0;xdotool click 1;
sleep 2;

# dont show sidebar (setting in user panel)
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool mousemove 30 1035;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0;xdotool click 1;
sleep 3;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool mousemove 1345 715;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0;xdotool click 1;
sleep 2;

# show frame tab
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool mousemove 40 30;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0;xdotool click 1;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool mousemove 100 175;
sleep 1;
export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0;xdotool click 1;

I started doing this because because my Pi/Chromium would need to login the user every time after a restart (even without incognito mode). The error I got was:

Login attempt or request with invalid authentication from framepi (192.168.0.200). See the log for details.

To be clear: this is a rather dumb solution to the problem since it breaks easily but in lack of other solutions…