iCloud binding, authentication problem

As decribed within my post above, i believe that its an Apple/Apple device issue if the code seems to be not pushed.

I don’t think so.

In all other cases (Logon to icloud.com, or in iTunes etc.) all my devices are pushing correctly the 6-digit query. Only with the binding there are problems, so I think the problem is in the binding.

I had a look into this. There seems to be changes in the iCloud authentication API again. So the current implementation in the binding is not working anymore.
I checked the pyicloud project, which the current implementation is based on. The authentication there has the same problem. It expects a 2FA code, but none is issued.
There is a pull request for pyicloud which addresses this problem: GitHub - timlaing/pyicloud: A Python wrapper for accessing data from iCloud webservices, including Account, Find My, Calendar, Contacts, iCloud Drive, Photos, Hide My Email, Reminders, and Notes. Ā· GitHub

The problem is that in a short test this also has problems (sending one code via sms and one via the trusted device action (push notice)). And looking into the PR itself, there are a lot of changes, which won’t be easy to incorporate into the binding :frowning:

My Things remain online, even after a Linux system reboot… Strange.

Anyway, I can imagine the tall order the necessary changes present. I hope you soon find the courage :wink:

As mentioned earlier, i have not observed any restrictions or authentication issues since your last fix. Everything is ā€œOnlineā€œ. :flushed_face:

Hm strange. Maybe users a directed to different API versions on Apples side. I also observed that users reported problems when it was still working on my side…

I have the same problem since ~2 weeks, ā€œPlease provide 2-FA code in thing configuration.ā€ but I don’t get any 2-FA Code on my iPhone

I now have the same issue since the beginning of this week
i.e. Not receiving the 2FA from Apple

Openhab 5.1.3

I removed my password and added a dummy password which then caused a failure obviously
Request https://idmsa.apple.com/appleauth/auth/signin/init failed with 503.

Putting the Correct password back gives my the exact same error(no 2FA Code in openHAB at all
Request https://idmsa.apple.com/appleauth/auth/signin/init failed with 503.

Putting a ā€œdummy 2FAā€ code in I then get the error
Please provide 2-FA code in thing configuration
and the email from Apple stating that something has Logged into my account(normal) but no returned 2FA request from Apple

I have NOT (YET) changed my password to try that process but could do it just painfull but it is due for a change soon anyway :wink: (if there is any evidence this works it will speed up time):stopwatch::rocket:

For me it is still working. Last computer & OH reboot today. Thus, the theory of @maihacke that currently different API versions on Apple’s side are active seems to make sense.

If you want to experiment please do so: Release Draft Implementation for SMS authentication Ā· maihacke/openhab-addons Ā· GitHub

Hi Simon,

many thanks for your work.
I have tested…got the SMS and the Things are online again….
Will take a sharp look on it in the next time

Ralph

After a power outage last evening I was not able to get my iCloud account back online. No 2-FA. However my wife’s account worked fine, including a 2-FA request. I was running 5.0.4, so I tried your SMS iCloud binding 5.1.4 and now all is good. Thank you for your effort. Very much appreciated.

Hi @maihacke

running 5.1.3 and installed the test version and seems to be working again, thanks for the work on this.

Thanks @maihacke!
Updated to 5.1.4 and ran into this authentication problem. Have had no problems so far.
Works again with your SMS version. Thanks!

I’m now also testing this version. I had noticed the Thing had gone offline.

At first, no succes with the new binding version…I then asked the missess: ā€œI assume you didn’t change the password?ā€ She replied: ā€œYes, I did. I had forgotten the previous oneā€ā€¦

After a terribly long search for the new password and eventually changing it yet again, I was able to get the Thing online again.

Still no SMS 2FA, so the new version still works for the ā€˜older’ login systems.

Upgraded to 5.2.0-Snapshot #5309 today and the December fix is still working out here. Before i move to the new SMS version, i will further observe when the December fix will probably fail. Nevertheless many thanks to Simon @maihacke for all the efforts!

I created a new test version for OH 5.1.x: Release Fix icloud 2-fa authentication (via sms/imessage) Ā· maihacke/openhab-addons Ā· GitHub

Please tests, I plan to ingrate this into upstream.

Thank you! I have installed the new version and it is working well so far. My configuration is not very exotic, single iCloud account, received SMS for the 2FA code and everything is online. Will report back if I see any issues.

Just installed it. I needed to restart the iPhone Thing, but not the bridge Thing. And that’s all it took to get going again. No new 2FA login needed.

I’ll keep you posted if anything arises.

Upgraded to 5.2.0-Snapshot #5369 today and the December fix is still working out here. Before i move to the new SMS version, i will further observe when the December fix will probably fail.