How to login to user other than Legacy API Password

I am trying to login to my front end from a new browser and Home Assistant is requesting the password for the Legacy API Password account. From what I can tell, there is not a way to switch users.

image

If I try to login with the password that is set for the Legacy API Password, I get the following error:

Error: Message format incorrect: required key not provided @ data['redirect_uri']

The http section of my configuration file is as follows:

http:
    base_url: !secret http_url
    ssl_certificate: !secret http_certificate
    ssl_key: !secret http_key
    api_password: !secret http_api_password

Any ideas on how to log in?

It looks like your indentation is off. Use 2 spaces instead of 4.

You can add additional login methods like so:

homeassistant:
  auth_providers:
   - type: homeassistant
   - type: trusted_networks
   - type: legacy_api_password

http:
  trusted_networks:
    - 192.168.1.0/24
1 Like

Adding - type: homeassistant in the the auth_providers: did the trick. Thank you.

I didn’t realize that by adding the legacy password I was removing the homeassistant default.

Why are you specifying any auth providers? you shouldn’t need any with your posted config. You did need it originally but it is not needed now. What it does now is if you define an api_password it is enabled for login.

I am using the iOS app. Based on the documentation, thought I could only use the legacy api password to connect.

The current released app you need legacy but the way you are defining this has changed as per my above post.

Per https://www.home-assistant.io/docs/authentication/providers/#configuring-auth-providers I see it’s getting confusing though.

I don’t believe you need to define auth_providers at all - if you define them then any provider you don’t specify is blocked which was the first issue you had.

You should be able to define a trusted_network and a legacy_api in the http: section only and it will work. If they are defined there then they are automatically enabled so I would suggest you comment out auth_providers and the 3 types as none of that is needed.

Specifically regarding iOS, the old iOS app requires legacy_api but if you join the iOS beta, you can use the new auth and you won’t need legacy_api at all unless something else is relying on it.

1 Like