gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Apple ID Verification Code process broken #324

Closed polskikrol closed 2 weeks ago

polskikrol commented 3 months ago

ICLOUD3 v3.0.5.6 on HA 2024.7.4 (docker)

After the latest iCloud3 update I cannot confirm the Apple ID verification code. I attempt to input it via the iCloud3 menu, but when I click submit on the code entry page, it kicks me out to the previous menu screen without sending the code nor confirming its acceptance. Tried with Brave and Firefox browsers. Tried the submit menu button and simply hitting enter.

gcobb321 commented 3 months ago

The HA 2024.7.4 caused a lot of problems for iCloud3 v3.0.5.6

iCloud3 v3.0.5.7 appears to be working under HA 2024.7.4/HAOS 12.4

The zip file below contains an update to iCloud3 v3. I have not released it yet but would like you to try it to make sure there are no other issues I need to look at. Let me know if it now works. TThanks.

Gary

Unzip icloud3 v3.0.5.7 into the config/custom_components/icloud3 directory and restart HA.

icloud3 v3.0.5.7.zip

polskikrol commented 3 months ago

Still broken. Here are the screens I cycle through. I request a new Apple ID code, and click submit, and just takes me back to the previous menu.

Screenshot 2024-07-31 at 10 31 44 Screenshot 2024-07-31 at 10 31 53
gcobb321 commented 3 months ago

Are you using a hardware key? Like Yubikey? if so, iCloud3 does not support hardware keys. I'll be looking at that on the next update.

polskikrol commented 3 months ago

I am not... standard iPhone setup. Everything worked fine for months, and I was able to re-auth when needed. Ran updates today and broken.

gcobb321 commented 3 months ago

Go to the iCloud Account & Mobile App screen on the Menu and make sure you are signed into your iCloud account. Your account will show on the LOG OUT... line at the bottom.

image

polskikrol commented 3 months ago

Dug into this a bit deeper. Somehow my account was locked for security purposes? No idea how that happened. Issue resolved now.

gcobb321 commented 3 months ago

I don’t exactly know how the account got locked. Sometimes after a number of login errors, Apple will lock it. Apple sets a’ lock’ flag on the account and iCloud3 reports it but, if locked, it does not get info back to iCloud3.

polskikrol commented 3 months ago

Anyway to make GUI reporting a bit better for these cases? For example, if you are trying to get or confirm a code and you are not logged in, display an error message in the GUI with the failure reason? Or an extra pop up to confirm iCloud credentials? Instead of just failing back to the previous menu screen.

Another idea could be a credentials config screen to list all iCloud accounts, if the login auth is valid, and when the next token or auth refresh will happen?

On Wed, Jul 31, 2024 at 18:21 Gary Cobb @.***> wrote:

I don’t exactly know how the account got locked. Sometimes after a number of login errors, Apple will lock it. Apple sets a’ lock’ flag on the account and iCloud3 reports it but, if locked, it does not get info back to iCloud3.

— Reply to this email directly, view it on GitHub https://github.com/gcobb321/icloud3_v3/issues/324#issuecomment-2261557233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAGRDDYIB36NQ3ICTU5F5LZPFPQFAVCNFSM6AAAAABLYS3GHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGU2TOMRTGM . You are receiving this because you authored the thread.Message ID: @.***>

gcobb321 commented 3 months ago

@polskikrol Changes have been made on the the Enter/Request Apple Account Verification Code screen in the next version, v3.1, to support multiple Apple Accounts. It shows if an account needing authentication is not logged in. A Login to Apple Account option has been added to the Action if it is needed.

barrilgroup commented 3 months ago

Hey Folks

Are you done with receiving the constant verification(2FA) request popping up on your Apple Devices and having to insert the verification code into HA to keepicloud3 working? I have found this workaround from Apple, to create an APP password. This way you can log in once to iCloud3 and forget about it and no more annoying Verification Code requests on other Apple Devices connected to your iCloud.

Have Fun, loving the iCloud3, thanks @gcobb321

Renato

gcobb321 commented 3 months ago

@barrilgroup On the iCloud3 Configure Settings > Enter/Request Verification Code screen, When you request a new verification code, the current token/password and session cookies are deleted. iCloud3 then refreshes the iCloud data which causes a verification code request. If you enter the app specific code, is it accepted or do you get an invalid password error?

I have been digging into this to see how it might work without success. So far, it keeps coming up with an invalid code message. There have been some in Australia that have had a partial success with the HA Apple integration using the an app specific password and I’m wondering if it depends on the Apple server location. I’m in the US. Where are you?

barrilgroup commented 3 months ago

Hi Gary

I found this article today, and implemented it about an hour before I posted. So far have not received any 2FA notifications to verify and punch in any codes.

I am based in South Africa.

I do not have any invalid code errors in the icloud3 log, and so far not getting any verification requests, was getting them every 10 minutes before.

Kind Regards

[photo] Renato Dequcinis Master of all things BaRRiL Group (Pty) Ltd [Speaker phone with solid fill] 087 551-1748 | 082 553-8702file:///Applications/Microsoft%20Outlook.app/Contents/Resources/DFonts/082%20553-8702 https://barrilgroup.co.za | https://www.doublebarril.comhttps://www.doublebarril.com/ @.http://www.facebook.com/BaRRiLGroup/ @.http://www.linkedin.com/in/barril-group-72261a141/ @.http://twitter.com/Barril_SA @.http://plus.google.com/u/0/113182263467595336308 @.http://www.youtube.com/channel/UC1WK8awSgS0aFub0Lq2xnGA?view_as=subscriber @.http://www.instagram.com/barrilgroup/ IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.

From: Gary Cobb @.> Date: Tuesday, 13 August 2024 at 15:15 To: gcobb321/icloud3_v3 @.> Cc: Renato Dequcinis @.>, Comment @.> Subject: Re: [gcobb321/icloud3_v3] Apple ID Verification Code process broken (Issue #324) You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

On the iCloud3 Configure Settings > Enter/Request Verification Code screen, When you request a new verification code, the current token/password and session cookies are deleted. iCloud3 then refreshes the iCloud data which causes a verification code request. If you enter the app specific code, is it accepted or do you get an invalid password error?

I have been digging into this to see how it might work without success. So far, it keeps coming up with an invalid code message. There have been some in Australia that have had a partial success with the HA Apple integration using the an app specific password and I’m wondering if it depends on the Apple server location. I’m in the US. Where are you?

— Reply to this email directly, view it on GitHubhttps://github.com/gcobb321/icloud3_v3/issues/324#issuecomment-2286227859, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHA5EELMM6NXWZM73LGSENLZRIBHJAVCNFSM6AAAAABLYS3GHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBWGIZDOOBVHE. You are receiving this because you commented.Message ID: @.***>

raptile commented 2 months ago

I am running v3.0.5.7 but all of a sudden i am logged out and i keep getting the verification code and am not able to insert it.

image

I insert the code here:

image

Then i select this:

image

Then i get this screen:

image

Then i get this screen again:

image

But no code comes. Not even when i select the option to get one.

Then when i retry it all... It indicates the code is incorrect while i get a mail that i am logged in.

image

So i restarted HA and had to do it again and this time it worked.

So it looks like u need to retry it a couple of times.

gcobb321 commented 2 weeks ago

Closed with the v3.1.1 Release. Create a new issue if you continue to experience this problem.