Login page over and over

I first installed HA (on PI 3+) a few months back. I could log in once, then stay logged in even on full page refresh or opening a new tab. Then I had to re-install HA. Now I’m prompted to log in every time I refresh a page or open a new tab, which is super-annoying. Any tips on why it would behave like this?

Thanks

Assuming you are not using private mode of your web browser:

Clear your web browser history and cache, (everything, cookies passwords etc…). Restart your browser.

Log back in to HA. Look for the remember details pop up in the bottom right corner.

Thanks, but even if I was using a private session (which I’m not) there should still be a session cookie stored in the browser so if I hit F5 it shouldn’t ask for login again. That makes no sense whatsoever and doesn’t happen anywhere else that I know of. I’m a web dev myself so I know a bit about those things, but looking through the cookies I can’t see any from HA.

Your suggestion would just have the browser remember username and password, but the login page would still pop up every time.

Instead of dismissing the idea did you try it?

Try a hard reload and cache clear.

Other things you can try,

  • Check your HA http configuration.
  • Delete your refresh tokens.

As a workaround until you fix the problem:

  • Use trusted networks.
  • Use another browser.

Of course. I tried several browsers and private modes (which is ensuring starting with a clean slate). I even tried several computers.

Look under “Settings” -> “Users”
If there is still a legacy User delete it.
That fixed my problem.

What do you mean by HA http configuration? Where is that?
How do you delete refresh tokens?

Strangely enough, it suddenly works in Chrome on my laptop, but not Firefox or Edge or other computer. Looking at the cookies in Chrome for HA domain, I see Cookie: PHPSESSID=10s732i0agcug8hshdu791478s, which explains it. But that one (or any other) is not there in other browsers.

I really dont get this.

http configuration is in your configuration.yaml file.

Refresh tokens are in your profile.

Not working again, weird stuff. I have no idea why it worked temporarily, but again login page is not setting any session cookie and I’m back at login page on every F5.

OK, thanks. Nothing looks like helping so far unfortunately. It worked briefly in Chrome and I did see a sesson cookie, but now its back to not working or setting the cookie. Not sure if deleting the refresh tokens had anything to do with it, but that’s not important either.

I’ll keep scratching my head…

You know what? You were right all along. I had mistaken this for the browser asking to remember the user/pass, but of course this was HA asking if I wanted the session cookie set or not.

Thanks a lot!

1 Like

Hi, I would like to know if you managed to solve the session problem. My Homeassistant is constantly asking for the username and password every time I log in and it is not solved neither by deleting the tokens nor by deleting chrome completely. I have also tried with Firefox. I am using an Intel NUC with vmware ESXi 6.8 and a Homeassistant OS installation. Thank you for your help

1 Like