iOS Safari Browser ( auth: False ) Unable to connect to Home Assistant. RETRY

Hello

I am ABLE to log into Home Assistant UI for my computer using Safari pointing to https://192.xxx.xxx.xxx:8123

I am UNABLE to log into Home Assistant UI for my iPhone using Safari pointing to https://192.xxx.xxx.xxx:8123

The login screen appears for user name and password to be entered.

After entering user name and password and clicking next HA seems to think about it for a few seconds and then responds with the following: HA logo and Unable to connect to Home Assistant. RETRY

In /var/log/syslog I find the following

Feb 18 08:30:32 officepi hass[528]: 2019-02-18 08:30:32 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.xxx.xxx.xxx

Feb 18 08:30:32 officepi hass[528]: 2019-02-18 08:30:32 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/authorize to 192.xxx.xxx.xxx (auth: False)

Feb 18 08:30:32 officepi hass[528]: 2019-02-18 08:30:32 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/providers to 192.xxx.xxx.xxx (auth: False)

Feb 18 08:30:32 officepi hass[528]: 2019-02-18 08:30:32 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 192.xxx.xxx.xxx (auth: False)

Installed Hassbian on Raspberry Pi 3 B+

Using a self-signed certificate.

Tried clearing browser cache.

Tired private browsing mode.

Cannot locate any ban file within .homeassistant

Have read numerous post which seem to have different reasons for same error message.

Any guidance would be most appreciated.

looking at that you use HTTPS, I assume you have activated the

What you need to do is import the key file into your phone. See this:

Hello Piggyback

Thanks, Will give it a try.

What I do not understand is that iOS Safari browser displays the lock when I go to https://192.xxx.xxx.xxx:8123 and does not complain.

So why jump thru all the hoops to login with the username and password?

I suspect your pc saved the key when logging in first time Safari doesn’t have that option.
I haven’t tried mine with safari though. I use chrome on my iPhone.

Not sure if I am understanding any of this enough to proceed.

As an experiment I created a new certificate in homeassistant folder.

Cleared all history and cache from iOS Safari browser in Settings

Relaunched iOS Safari browser

Went to https://192.xxx.xxx.xxx:8123

The iOS Safari browser displayed the expected warning and gave me the option to go back, view certificate or visit webpage.

Proceeded to visit webpage which displayed the Home Assistant login page.

The lock is displayed in the Address field.

Enter user name and password and press NEXT.

The result is a window that shows the HA logo with Unable to connect to Home Assistant and a RETRY link.

Safari is allowing the self signed certificate as evident from the lock in the address bar so why can I not log in to HA???

I’m stumped on importing the self-signed certificate.

Tried emailing (local server) the cert to myself but when I clicked on the cert there was no option to add the cert. Just an OK button appeared and then basic options like message, email, file, etc…

Are there any good instructions to AIRDROP or MAIL the file and have installed on the phone?

Feel like I’m going in circles and just burning daylight.

I emailed it and then opened it, but I recall I had several tried before I finally succeeded. Just like this post. Maybe it helps.

You can check to see if the certificate imported in your settings on your phone. Look up the menu structure (depending on your iOS version). On 12.1.2 its Settings>General>About>Certificate Trust Settings. If the certificate installed, there will be a root certificates with a slide button next to it. Ensure the slide button is turned on.

Once you have confirmed the certificate is installed and turned on, you need to use port 443 not 8123. Open a port on your router and forward WAN 443 to 192.xx.xxx.xxx:8123. I think the app will only work with certificates on port 443, I’m not sure.

It was awhile ago I got this working, but these are the steps I recall.

Hi hotswapster

Thanks for the information.

I’m on a local network and not going out over the WAN.

I’m getting the LOCK on the webpage

I’m not able to log into HA from the iOS phone.

Tried the app with same results.

App even finds the HA and lists the IP address at the top of the page in the app.

247365

@247365 I couldn’t get my app to work on port 8123, only 443 worked. You could change HASS’s port to 443 or just don’t use a certificate if you’re only using it on a LAN?

Will try 443 tonight.

I’ve exact the same problems. Login with Chrome on my PC works. Using my iPad or iPhone + Safari App it give me the same error message. Only if I login to Home Assistant using my external url duckdns.org it works. On my local Network only with Chrome ony my PC.

And when I follow the openssl instructions I come to that point to copy the certificate.pem into homeassistant and link to it in my configuration.yaml. BUT I already use certificates:

http:
  base_url: https://xxxx.duckdns.org
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

So can I put more than one certificate into the ssl_certificate line?

Same problem. Dashboard reports “Login attempt or request with invalid authentication from my ip”.

Same problem…

Yep, same problem here. On Safari and Chrome on iOS and iPadOS