[SOLVED] Unable to Create User with New Auth System

I have setup the new Auth System in the configuration.yaml, similar to below:

homeassistant:
  # Auth Providers
  auth_providers:
  # Home Assistant Auth
   - type: homeassistant
  # Legacy API Auth Support
   - type: legacy_api_password
auth:

I’m able to go to https://my.ha.instance/frontend_latest/onboarding.html and enter in my Name, Username and desired Password. When I select “Create Account”, it just sits there. It doesn’t act like it’s trying to create anything.

I am running 0.74.1 and Python 3.6.3 on an RPi.

If I try to login from incognito, it does recognize that the new Auth System and the API Password are available.

Any ideas are welcome.

Any logs or info needed, just let me know what and perhaps where to grab them and I’ll get them.

Note: I am using DietPi’s one-click install for HA and runs a bit different than the PyEnv from the tutorials above.

2 Likes

Looks like I needed to completely remove the .storage folder and it began to work perfectly.

2 Likes

Thank you! This worked. I had an issue since updating from my previous version of HASS (a version of HASS that didn’t have user accounts). I was getting: Logging in with Home Assistant Local. Invalid username or password

Deleting the \\hassio\config\.storage folder, restarting hassio host, then logging in with my legacy password, finally got me to the onboarding screen where I was able to make a new user account for myself (I had been otherwise unable to create user accounts in the config page under my legacy account: cannot add users homeassisant). The home-assistant docs page for the Auth System helped too.

I had an added layer of complexity where my SSH/letsencrypt & duckDNS tokens had also both expired. I use duckdns and hadn’t realized that the duckDNS addon now takes care of access tokens apart from letsencrypt. So updating letsencrypts token didn’t work at all for me. Changing the duckDNS configuration ( https://xxxxxx.duckdns.org/hassio/addon/core_duckdns ) "accept_terms": flag to "true" and re-starting that addon updating the token I needed in duckDNS.

Glad to have this resolved.

I’m having similar problems: since upgrade to 0.83.3 I’m having tremendous difficulties in getting the auth system to work reliably. First I didn’t get any access to the home assistant page but I could see nothing in logs and hass runs on the system (checked via SSH). After much error tracing it all came down to the auth system. Nothing has changed in my configs but now the web interface of Hass just keeps saying “Cannot connect to Home assistant”. I’ve tried to delete the .storage-files, cleared the browser cache, reboot the hass-machine and create a new user account. Sometimes it works, often not.

Sometimes I get a “Server 500 response”, sometimes the “create account” button does nothing and sometimes I get a new account and access to the web interface. However, I can verify that .storage/auth is written to every time I press “Create user” since it increases in size. The other files are not created, however.

I face this every time I restart HASS. What gives? Needless to say, it’s getting quite annoying and time consuming.

As of now, I can’t even login and use my HASS instance.

I’ve spend hours on fault searching and cannot find anything out of the ordinary.

Edit: upgraded to 0.84.3. Same issue.

Did you delete the .storage folder or just the files within?
If you’re only deleting the files within, there could be some sort of permissions error. (I personally run a script every once in a while to change all permissions and read/write/execute levels to all files under .homeassistant as I run PyEnv and use Git to edit/move files around.)

Server 500 are errors from the Server itself. Are you running PyEnv, Docker, HASSio?

Tried both variants. Running on a Rasbian Lite headless server under the PyEnv.

Nothing in regards to permissions have changed between the updates.

Still having an issue with this.

Works perfectly fine here

Ok I reinstalled and got it working. Turns out when it does the update, it also ipwalks… so it was 192.168.1.40… then .41… and the mdns apparently doesn’t work on orbi

This really is SUPER ANNOYING. I suffer from authentication issues for several weeks now.
Problems seem to be gone, then is restart HASS and it’s here again.

So what i did now: Stopped HASS, deleted .storage directory, restarted HASS. Waited some minutes for HASS to be fully loaded. Then went to “incognito mode” on Chrome to circumvent all cache ets. Opened the HA webpage, and was greated by the “frontend_latest/onboarding.html” page.

Entered name/user/pwfd. Pressed “create user” - nothing happened. Waited, waited … After some time i got “Bad response from server: 500”.

So frustrating. What shall i do to solve that?

Just as a possibly-helpful experience: I had this issue just now (500, like @iz3man), and had to comment out the auth_providers: section entirely (then restart) to get homeassistant to complete the onboarding.

If possible, I’m going to ditch everything that needs the legacy password (and avoid other auth providers) as I don’t want to hit this again.

Note: This started when I couldn’t auth in to the vscode addon with my proper username/password.

Thanks, this is also the solution with a docker installation.

I forgot a password, tried to just remove auth and onboarding in .storage, this led to the error homeassistant.auth.providers.homeassistant.InvalidUser in the docker logs when going though the onboarding (clicking Create User did nothing, the error and Traceback was visible only in the logs).

1 Like

Thank you, also running docker and this one saved me.
I copied files from the backed up .storage_old into the new one so I don’t have to start from scratch. homekit, esphome and lovelace were back to normal like nothing happened.