gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
498 stars 52 forks source link

Apple does not send me a 6 digit passcode. #326

Open darkarena1 opened 3 months ago

darkarena1 commented 3 months ago

I'm using icloud43 v3 and when I REQUEST A NEW VERIFICATION CODE from icloud3, I get a message on my apple device confirming if it's me who is logging in. When I select OK, it DOES NOT give me a 6 digit verification code. Is there a way to force it to give me a verification code? I do have 2FA turned on.

gcobb321 commented 3 months ago

Request it on the Configure Settings > Enter/Request Verification Code screen. Then enter it on the same screen

darkarena1 commented 2 months ago

I did that before and it didn't work. I tried it again. Here is what happens.

  1. I enter my login credentials when the config asks me
  2. I check the REQUEST A NEW APPLE ID VERIFICATION CODE radio button
  3. I click submit
  4. On my APPLE DEVICE a dialog pops up asking if it was me trying to sign in
  5. I click "Approve"
  6. There is no code displayed on the apple device

I do see the screen in Home Assistant that asks me to enter the icloud account verification code, but there is no verification code to enter. Have you ever herd of this before?

gcobb321 commented 2 months ago

No, I have not heard of this. Apple sends the code to a trusted device. Maybe check your Apple account to verify you are logged in, on the Family Sharing list, seen in the Find Amy app, Sharing is on, etc. Maybe one thing to try is to install the HA iCloud integration and see what happens with it. Both iCloud3 and the iCloud integration will use the same token files.

darkarena1 commented 2 months ago

@gcobb321 I found out the issue. If you have a security key attached to your apple account such as one from Yubico, Apple doesn't send you a six-digit authentication code. Other services let you use other 2FA methods, but for Apple its all or nothing.

To fix this I removed the keys from my account and I started getting the six-digit code again. I'm going to do some more experimentation to see if I can find a happy compromise to this and I'll post my results here before closing. I'm wondering if I copied the code from my security key into iCloud (it's a much larger key than six digits) if that might allow authorization.

In any case, short term answer would be to ensure people don't have physical security keys attached to their AppleId.

Stapxs commented 2 weeks ago

I also have a security key and have the same problem.

gcobb321 commented 2 weeks ago

Security keys are not supported. Apple does not provide a web interface for them as far as anyone knows.