Getting login screen when re-opening app (iOS12/13, HAC 1.5/2.0b)

Frequently when I re-open the Home Assistant app I get the initial login screen, where it asks me for a username and password. This seems like it only happens when the app has been open and I go back to it. If I kill the app through the app switcher and open it again it always logs me straight in.

This has been an issue for awhile on 1.5 (and on iOS 12 & 13) but hitting the reload button at the bottom has always solved it, so while it was annoying I didn’t worry about it too much.

The problem is that now with the 2.0 beta, that refresh button at the bottom of the screen is gone. So now I need to kill and reopen the app or fill in my username/password again, both of which are much more annoying than hitting refresh.

My wife also experiences this issue, so I don’t think it’s something with my phone. I’m sure it could be something with my setup but I can’t imagine what it would be.

I know I’ve seen other people mention this issue, has anyone found a solution for it?

There’s an “App Configuration” option in the left hand menu. In that panel right at the bottom is a “Reset Front End Cache” option. Might be worth a try.

The other “Reset” option will clear everything and you will have to re-enter your HA connection details. This too might be worth a try as there seems to be something wrong with your refresh token.

There’s also this procedure you can try to start from scratch:

Seems like clearing the frontend cache did it, thank you!

I have this problem as well, for months where clearing cache would only solve it temporarily. Though a refresh works for me. No need to actually login again. This also works outside of my network. So next time if you face this problem try refreshing the app (it is a slide down action if you use ios app 2.0).

This happens to me also and refreshing fixes also by pulling down.

For what it’s worth, this fix only seems to be temporary. The login screen issue comes back again pretty quickly.

The pull-to-refresh solved my question about refreshing in the 2.0b at least though, so thank you for that.

I’ll open an issue in github for the larger problem of the login screen showing up.

for those looking

The root cause for this has been identified. The app does not refresh the token when in the background and not when coming out of susoend.

This only happens when no background sensor/location update happens for at least 30 minutes while the app is in the background.

The missing token refresh on resume from standby will get fixed now that the issue is understood. No timeline yet.