home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.47k stars 29.4k forks source link

iCloud Integration - unable to authenticate #94950

Open SheriffOfNotts opened 1 year ago

SheriffOfNotts commented 1 year ago

The problem

Integration worked fine. When needing to re-authenticate it won't accept new app specific password with the enclosed error.

Screenshot 2023-06-21 at 08 02 53 Screenshot 2023-06-21 at 08 01 04

What version of Home Assistant Core has the issue?

Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

What was the last working version of Home Assistant Core?

core-2023.6.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

iCloud

Link to integration documentation on our website

https://www.home-assistant.io/integrations/icloud

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

home-assistant[bot] commented 1 year ago

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.

(message by CodeOwnersMention)


icloud documentation icloud source (message by IssueLinks)

ThierryVos commented 1 year ago

I also have authentication issues with the iCloud Plugin in Home Assistant. I can input my password for my account, which then verifies and should generate a security code on my iPhone. That it does not. So HomeAssistant is waiting for a security code, which I am not receiving from Apple.

I've also tried using an app password, but for some reason that too triggers the security code prompt (which this shouldn't by the way).

saya6k commented 1 year ago

I'm getting same result to Thierry. I first thought there's something wrong with security key option enabled in iCloud, but I think it's not.

aram535 commented 1 year ago

I'm on a later version: Home Assistant 2023.7.2 Supervisor 2023.07.1 Operating System 10.3

Weird enough, my icloud connection had been working fine with a app specific password for a long time and all of a sudden it went crazy and started to send icloud verification/verification code over and over and over. I had to disable then delete the entire integration for it to finally stop.

I waited 24 hours, generated a new password added the integration and tried to authenticate using the password -- it accepts the password but then asks for a "iCloud verification code" which never prompt on my devices.

I tried deleting the .storage/icloud and restarting HA. I don't have any yaml code for apple or icloud so it's all in the integration.

SheriffOfNotts commented 1 year ago

Exactly the same issue I have

SheriffOfNotts commented 1 year ago

I’ve also deleted anything relating to iCloud from .storage folder…

rhoskins61 commented 1 year ago

Same issue, won't accept re-authentication. Has this integration been vacated?

Pierrodu21 commented 1 year ago

Same issue here, I can enter my password but then no verification code is received…

IMG_0067

Pierrodu21 commented 1 year ago

The issue is still present with the latest Home Assistant release 2023.8.0...

Can we give you more details to help fix this issue?

groe105 commented 1 year ago

… I’m having the same issue!

rlust commented 1 year ago

Having same issue, any ideas?

aram535 commented 1 year ago

Just FYI -- it's the "application password" that seems to be broken. If you use your regular account and password it seems to work.

Pierrodu21 commented 11 months ago

And... I've tried again after coming back home from vacations and it works again!

I think it was fixed by the awesome Home Assistant team between 2023.8.0 and 2023.8.4, if you have this issue too, can you try again and tell us if it's fixed for you too?

ThierryVos commented 11 months ago

For me it was going haywire again with MFA on my phone every half hour. Rebooting HA seemed to work to solve this. Definitely some strange behavior still..

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Pierre @.> Sent: Wednesday, August 30, 2023 12:13:25 PM To: home-assistant/core @.> Cc: ThierryVos @.>; Comment @.> Subject: Re: [home-assistant/core] iCloud Integration - unable to authenticate (Issue #94950)

And... I've tried again after coming back home from vacations and it works again!

I think it was fixed by the awesome Home Assistant team between 2023.8.0 and 2023.8.4, if you have this issue too, can you try again and tell us if it's fixed for you too?

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/94950#issuecomment-1698884048, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADDRFR3SH6YJU2SQWIIR2T3XX4G4LANCNFSM6AAAAAAZOJK6ME. You are receiving this because you commented.Message ID: @.***>

rhoskins61 commented 11 months ago

Yeah, still not working. Re-enabling sends an authentication verification to iphone, but nothing related required with the integration, just a password (which one time, I entered a fake password and it was still accepted). This integration is just not reliable any longer. I'd venture to say it is Apple's fault (security/privacy stuff?), but who knows.

wlucha commented 11 months ago

Same issue for me :(

earstreet commented 9 months ago

Same here. A week ago I installed it for the first time and everything works. Yesterday I had to change my AppleID password because I got a strange message from Apple. Afterwards I couldn't authenticate anymore. Neither reinstallation of the integration nor deletion of the iCloud folder in configuration/.storage worked for me.

issue-triage-workflows[bot] commented 6 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

aram535 commented 6 months ago

This should either be a bug or enhancement depending on if the original design was to allow static passwords. If you generate a static "application" password from icloud so that the password rotation isn't a problem the integration fails to authenticate (or it continues to ask for the verification code) which is not required when using the application password.

l1onk1n6 commented 6 months ago

Doesnt work for me. Get the auth notification, but no code from apple

Pierrodu21 commented 6 months ago

For my part, it's been working pretty well since the end of August. Roughly once a month, it asks me to authenticate again, if I try right away it doesn't work, but if I do a red restart, not yellow, (see screenshot below), it asks me for my password, then a verification code that arrives on my phone and if I enter both, the integration is functional again. Can you try with a "red" restart if you have still this issue?

Red restart

workshopninja commented 3 months ago

Still not working April 2024 - asking for password, when given asking for code from apple that never comes…

issue-triage-workflows[bot] commented 3 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

darrenmcuk commented 3 weeks ago
dels78 commented 3 weeks ago

same as @darrenmcuk , the app specific password is never accepted and the logs show:

Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))

kerta1n commented 3 weeks ago