core icon indicating copy to clipboard operation
core copied to clipboard

Integrations asks app-specific password but only accepts the account password.

Open Wolk9 opened this issue 1 year ago • 23 comments

The problem

The dialog asks for an app specific password, but in reality it only accepts the password from your iCloud account. Either the authentication should be rewritten, or the UI should ask for the right thing.

What version of Home Assistant Core has the issue?

core-2024.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

iCloud

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Wolk9 avatar Aug 18 '24 23:08 Wolk9

Hey there @quentame, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (icloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of icloud can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign icloud Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


icloud documentation icloud source (message by IssueLinks)

home-assistant[bot] avatar Aug 18 '24 23:08 home-assistant[bot]

I can confirm that behavior described by OP is the same for me.

Here's my setup:

Core 2024.8.2 Supervisor 2024.08.0 Operating System 13.1 Frontend 20240809.0

gilperme avatar Aug 22 '24 04:08 gilperme

I have the same problem. If I try to set this up with an app specific password then my IOS device does not pop up the screens for generating the pin code, so you are unable to complete the registration in the HA integration GUI. If I use the account password, then I do get the pop up on the IOS device and can obtain the code to enter into the integration GUI.

Here's my setup

Core 2024.8.2 Supervisor 2024.08.0 Operating System 13.1 Frontend 20240809.0

Thanks

oceanice avatar Aug 22 '24 11:08 oceanice

same here, i can't login in integration

CarlosMunozT avatar Aug 23 '24 06:08 CarlosMunozT

Stesso problema per me, inoltre mi continuano ad arrivare sui dispositivi richieste di configurazione tramite accesso.

Mowgly1977 avatar Aug 25 '24 11:08 Mowgly1977

Same issue here. Asks for app specific password, have to enter account pw.

markus99 avatar Aug 28 '24 15:08 markus99

same problem here

jayjay3108 avatar Aug 29 '24 14:08 jayjay3108

Same here and I receive periodically emails that my apple id is used to login by a browser which is annoying. And a security risk because a real email from another login which is not from the integration can be overlooked.

denis1994 avatar Sep 09 '24 12:09 denis1994

Today I got the messages again about the regularly appearing 2-factor authorization. The app password is accepted, but the 2-factor authorization from icloud does not appear. The account password was accepted, but the 2-factor authorization was not accepted. After restarting, the integration it works again. It's getting annoying. Can this please be solved properly? Unfortunately, I'm not the only one. But I can't help with the development either, because I don't know enough about the authorization process. I've already deleted the icloud folder under .storage and that doesn't help with the actual solution, it just makes it work again as a workaround. Thank you very much.

Additional my home Assistant is the 2024.9.1

svalcken avatar Sep 09 '24 16:09 svalcken

App password is not accepted. Already tried deleting the .storage\icloud folder.

Core 2024.9.1 Supervisor 2024.08.0 Operating System 13.1 Frontend 20240906.0

Juanpermon avatar Sep 12 '24 08:09 Juanpermon

same here

Eniste1 avatar Sep 12 '24 19:09 Eniste1

Same issue - app-specific password not accepted, regular password accepted but doesn't show any devices/entities.

Niek avatar Sep 12 '24 19:09 Niek

Keeps happening on HA 2024.09.1. App password not accepted.

Juanpermon avatar Sep 13 '24 06:09 Juanpermon

What seems to work is: log in with regular password, delete the integration, add it again and log in again with app-specific password. Far from ideal though (I'm also getting spammed with security emails).

Niek avatar Sep 13 '24 06:09 Niek

I don't feel OK typing my Apple ID password outside Apple ecosystem :S

Juanpermon avatar Sep 13 '24 06:09 Juanpermon

Core 2024.9.1 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240906.0

rejoiced too soon...

Brief status report from my side:

After updating to 2024.9.1, app-based login (app-specific login) was initially possible. - So far so good

But then the spam flood of mails started again - (Your Apple ID was used to log in to iCloud via a web browser)

In addition, there were now constant 2-factor authentication queries on the iPhone directly (which of course could not be entered or confirmed anywhere in the Home Assistant).

I will unfortunately have to temporarily uninstall the iCloud integration

When these problems have been solved, I will be happy to try again

Eniste1 avatar Sep 13 '24 07:09 Eniste1

Same issue here :(

System info:

  • Core: 2024.9.2
  • Supervisor: 2024.09.1
  • Operating System: 13.1
  • Frontend: 20240909.1

Mwalton4uk avatar Sep 17 '24 00:09 Mwalton4uk

Today I got the messages again about the regularly appearing 2-factor authorization. The app password is accepted, but the 2-factor authorization from icloud does not appear. The account password was accepted, but the 2-factor authorization was not accepted. After restarting, the integration it works again. It's getting annoying. Can this please be solved properly? Unfortunately, I'm not the only one. But I can't help with the development either, because I don't know enough about the authorization process. I've already deleted the icloud folder under .storage and that doesn't help with the actual solution, it just makes it work again as a workaround. Thank you very much.

Additional my home Assistant is the 2024.9.1

Unfortunately, I'm fairly new at this. If another python dev wants to take a crack at this the proper flow is:

On Setup: Enter iCloud Email Enter iCloud Password Accept Login Prompt Enter iCloud 2FA

On Reauth: Enter App Password Reload Integration (not sure why this is needed but it is) Accept Login Prompt Enter iCloud 2FA

Reauth should not be required past this point. Login emails will continue but not device 2FA spam.

rcmaehl avatar Sep 24 '24 13:09 rcmaehl

Hey!

I have the same problem. For about 24 hours, the Apple system kept informing me about an attempt to log in. After confirming, the two-factor authorization code was displayed on Apple devices. After about 24 hours, the icloud integration in Home Assistant was deactivated (authorization error).

According to the instructions, I removed the integration, deleted the files from .storage. When trying to add icloud integration in HA with an application password, a request for a two-factor code is displayed, but the Apple system does not display any code.

Please deal with this problem, because repeated logging in every few weeks is irritating, and email and system notifications about logging in to the icloud account, or an attempt to log in are very misleading and pose a real threat - our vigilance decreases and it is easier to ignore the actual hacking of the icloud account due to the excessive number of false messages.

Ps: sorry for my English (I use a translator ;) )

`## System Information

version core-2024.9.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch x86_64
timezone Europe/Warsaw
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.1
Stage running
Available Repositories 1421
Downloaded Repositories 19
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
GIOŚ
can_reach_server ok
Home Assistant Supervisor
host_os Home Assistant OS 13.1
update_channel stable
supervisor_version supervisor-2024.09.1
agent_version 1.6.0
docker_version 26.1.4
disk_total 30.8 GB
disk_used 10.4 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Matter Server (6.5.1), RPC Shutdown (2.5), Samba share (12.3.2), File editor (5.8.0), Home Assistant Google Drive Backup (0.112.1), Advanced SSH & Web Terminal (19.0.0), Node-RED (18.0.5), Tailscale (0.22.0), Terminal & SSH (9.15.0), Music Assistant Server (2.2.6), Mosquitto broker (6.4.1), Silicon Labs Multiprotocol (2.4.5), DHCP server (1.4.0)
Dashboards
dashboards 3
resources 17
views 24
mode storage
Recorder
oldest_recorder_run 18 września 2024 12:44
current_recorder_run 28 września 2024 09:22
estimated_db_size 231.47 MiB
database_engine sqlite
database_version 3.45.3
`

darecki1986 avatar Sep 28 '24 07:09 darecki1986

Same issue here

gshlomi avatar Oct 02 '24 16:10 gshlomi

Give it now a solution for this issue?

svalcken avatar Oct 09 '24 15:10 svalcken

Same problem here. Using the regular password works, but after some time I am getting requests on my Apple devices to confirm Account-Login.

mdeuerlein avatar Oct 18 '24 18:10 mdeuerlein

same here.. deleted the connection and are no longer able to recreate..

dreamworks avatar Oct 19 '24 17:10 dreamworks

Thought this was a me problem but I am the same - hopefully we get a fx soon!

oneseventhree avatar Nov 28 '24 20:11 oneseventhree

Any update on this? As the integration is asking me for an app specific password, and then asks me for verification code. But I do not get verification codes with app specific passwords. When I enter my regular password, I do get the verification code. But apple keeps sending me emails that a device has logged in using my credentials. It is annoying because I cannot rely on this safety feature anymore. Not sure if it's HA or actually something/someone else logging in.

Tosko4 avatar Jan 14 '25 19:01 Tosko4

This is broken due to #128830

It's in process to be fixed but pypi who have control over the pyicloud repo need to approve the new owner as the old repo owner has been AWOL for ~2 years.

You can support the transition (and eventually fix) here:

https://github.com/pypi/support/issues/5377

rcmaehl avatar Jan 15 '25 00:01 rcmaehl

I just noticed the same thing today the first time I was working to set this up. I'd love to have this fixed as well.

fennemaj avatar Jan 27 '25 23:01 fennemaj

Some more detail here https://github.com/home-assistant/core/issues/128830

PaulCavill avatar Feb 10 '25 10:02 PaulCavill

I have the same problem. I type the app-specific password, but it asks for a verification code that never arrives. Core 2025.2.5 Supervisor 2025.02.4 Operating System 14.2 Frontend 20250221.0

taciano-perez avatar Mar 02 '25 09:03 taciano-perez

same problem

allancph avatar May 18 '25 19:05 allancph