Dadoum / Sideloader

Open-source cross-platform iOS app sideloader (yep, even Linux is supported). Alternative to Sideloadly, AltServer, SideServer, Cydia Impactor, iOS App Signer…
Other
247 stars 22 forks source link

App fails to login (SMS MFA) #51

Open adm1ncooler opened 1 month ago

adm1ncooler commented 1 month ago

This the loop error i get in kosnole:

  server.developersession INFO  2024-05-30T19:38:25.595 Creating DeveloperSession for someone@somedomain.com...
     server.appleaccount INFO  2024-05-30T19:38:25.595 Logging in...
     server.appleaccount DEBUG 2024-05-30T19:38:25.595 Fetching URL bag...
     server.appleaccount DEBUG 2024-05-30T19:38:26.444 URL bag OK.
     server.appleaccount DEBUG 2024-05-30T19:38:26.454 Sending first auth request...
     server.appleaccount DEBUG 2024-05-30T19:38:26.814 First auth request OK.
     server.appleaccount DEBUG 2024-05-30T19:38:27.005 Sending the second request...
     server.appleaccount DEBUG 2024-05-30T19:38:27.406 Second request OK.
     server.appleaccount WARN  2024-05-30T19:38:27.407 Unsupported next authentication step: "secondaryAuth"
Illegal instruction (core dumped)

What's going on?

Dadoum commented 1 month ago

It means you have sms 2FA and not a trusted device to receive a code. Currently Sideloader can't handle that. I will rename the issue. Two possible workarounds: make a new Apple account without 2FA in iTunes for Windows, add a trusted device to your account.

Also I plan to support this in the next weeks anyway. I will try to implement it today but I can't promise anything (got no test account).

adm1ncooler commented 1 month ago

It means you have sms 2FA and not a trusted device to receive a code. Currently Sideloader can't handle that. I will rename the issue. Two possible workarounds: make a new Apple account without 2FA in iTunes for Windows, add a trusted device to your account.

Also I plan to support this in the next weeks anyway. I will try to implement it today but I can't promise anything (got no test account).

OK, thank you. I will wait the attempt to implement SMS. I can make tests for you if you need. Shoul i build the app from main branch or you will compile it and publish the app inside like Nightly Repository ?

Dadoum commented 1 month ago

It is compiled automatically in the Actions tab on this repository, don't worry. Here is the latest test build. https://github.com/Dadoum/Sideloader/actions/runs/9307359934

I tried to implement it in that build, but I don't think it works. I have another idea on how to implement it.

Dadoum commented 1 month ago

Download it from the link here https://github.com/Dadoum/Sideloader/actions/runs/9307359934 https://github.com/Dadoum/Sideloader/actions/runs/9307359934

adm1ncooler commented 1 month ago

I receive the SMS on device and i write it into the windows form, but then:

...thentication.tfaslide ERROR 2024-05-30T21:20:36.133 Apple auth error: Incorrect Verification Code (-21669)
Dadoum commented 1 month ago

Ok I think I fixed that.

adm1ncooler commented 1 month ago

Downloaded this build: https://github.com/Dadoum/Sideloader/actions/runs/9308105426/artifacts/1553722337

the app stucks here now:

 server.developersession INFO  2024-05-30T21:40:04.178 Creating DeveloperSession for someone@somedomain.com...
     server.appleaccount INFO  2024-05-30T21:40:04.178 Logging in...

image

Dadoum commented 1 month ago

Can you retry?

adm1ncooler commented 1 month ago

Same artifact ?

Dadoum commented 1 month ago

Yeah I am guessing that it worked but it froze, so your computer might no longer need to go through 2FA.

adm1ncooler commented 1 month ago

Same behaviour,I think the app frozes, not my PC

image

Dadoum commented 1 month ago

Oh I think I know. Let me fix that

Dadoum commented 1 month ago

New attempt.

Dadoum commented 1 month ago

(it's now built)

adm1ncooler commented 1 month ago

now the app doesnt stuck anymore but i'm getting the below error:

...thentication.tfaslide ERROR 2024-05-30T22:12:11.773 Apple auth error:  (401)

Seems like unauthorized ?

image

Dadoum commented 1 month ago

Yet another attempt

adm1ncooler commented 1 month ago

Now i'm not receiving the SMS anymore (the account is not locked)

Dadoum commented 1 month ago

It still asks you for a code but no SMS is sent?

adm1ncooler commented 1 month ago

Exactly

Dadoum commented 1 month ago

What happens if you click on Re-send the code?

adm1ncooler commented 1 month ago
(sideloader-gtk-x86_64-linux-gnu:31844): Gtk-WARNING **: 22:34:37.231: Failed to launch handler: Re-send the code is not a valid uri: URI ‘Re-send the code’ is not an absolute URI

Still no SMS is sent, also in the previous artifact i got the error above but the sms was sent

Dadoum commented 1 month ago

I added a debug print to understand what's going wrong and stop trying blind shots.

Dadoum commented 1 month ago

(here is the link https://github.com/Dadoum/Sideloader/actions/runs/9308985428 )

adm1ncooler commented 1 month ago

No SMS has been sent, this the response:

server.appleaccount INFO  2024-05-30T22:52:34.236 Code sent: 
<!DOCTYPE html>
<html>
   <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <style>
         [data-ui-action=keep] {
         display: none;
         }
      </style>
   </head>
   <body>
      <div data-ui-action="keep">
         <span id="messageText">
         Error
         </span>
         <span id="informativeText">
         Cannot connect to iCloud. Try again later.
         </span>
      </div>
      <script type="application/json" id="service_errors">
         { "serviceErrors": null }
      </script>
      <script type="text/javascript" src="https://gsa.apple.com/auth/static/jsj/N1350635055/graphite/auth/boot/error.js" ></script>
   </body>
</html>
Dadoum commented 1 month ago

Maybe too much attempts has been made without a success? Can you log-in on the Apple website, then delete the file in ~/.config/Sideloader/device.json and ~/.config/Sideloader/adi.pb? (and retry)

adm1ncooler commented 1 month ago

I am able to login in https://appleid.apple.com I have deleted the device.json and adi.pb Same behaviour: no SMS sent, same Response above

if i click two times "re-send" button i get:

requests.base.RequestException@../../../.dub/packages/requests/2.1.2/requests/source/requests/http.d(1840): Network error during data exchange
----------------
??:? [0x5700c91a63b6]
??:? [0x5700c91a6032]
??:? [0x5700c91ce2c6]
??:? [0x5700c91af66f]
??:? [0x5700c9105dc4]
??:? [0x5700c91081ce]
??:? [0x5700c911e402]
??:? [0x5700c911df33]
??:? [0x5700c8f4c007]
??:? [0x5700c8f4bbfd]
??:? [0x5700c8f6905c]
??:? [0x5700c8dcdbaa]
??:? [0x5700c8e32852]
??:? g_closure_invoke [0x77f5be318649]
??:? [0x77f5be348ce4]
??:? [0x77f5be338e3f]
??:? g_signal_emit_valist [0x77f5be339841]
??:? g_signal_emit [0x77f5be339903]
??:? [0x77f5bd756142]
??:? [0x77f5be339731]
??:? g_signal_emit_valist [0x77f5be339841]
??:? g_signal_emit [0x77f5be339903]
??:? [0x77f5bd6856d4]
??:? [0x77f5be339731]
??:? g_signal_emit_valist [0x77f5be339841]
??:? g_signal_emit [0x77f5be339903]
??:? [0x77f5bd724ca6]
??:? g_cclosure_marshal_VOID__BOXEDv [0x77f5be31cd55]
??:? [0x77f5be339731]
??:? g_signal_emit_valist [0x77f5be339841]
??:? g_signal_emit [0x77f5be339903]
??:? [0x77f5bd729497]
??:? [0x77f5bd72a65a]
??:? [0x77f5bd72b6df]
??:? [0x77f5bd8520f9]
??:? [0x77f5bd852404]
??:? [0x77f5bd76acbd]
??:? [0x77f5bd76b88c]
??:? [0x77f5bd9c357f]
??:? [0x77f5bda53cbb]
??:? [0x77f5be339731]
??:? g_signal_emit_valist [0x77f5be339841]
??:? g_signal_emit [0x77f5be339903]
??:? [0x77f5bdaf3fbf]
??:? [0x77f5bd9dd07d]
??:? [0x77f5be5afa88]
??:? [0x77f5be6119b6]
??:? g_main_context_iteration [0x77f5be5aef94]
??:? g_application_run [0x77f5be443b85]
??:? [0x5700c8dd0c86]
??:? [0x5700c91af33c]
??:? [0x5700c91af236]
??:? [0x5700c91af08d]
??:? [0x77f5be9a4c87]
??:? __libc_start_main [0x77f5be9a4d4b]
??:? [0x5700c8dbfcb4]
Dadoum commented 1 month ago

New attempt (sorry if I bother you)

adm1ncooler commented 1 month ago

No worries, i’m here to help you! I will try the new artifact tonight Many thanks

adm1ncooler commented 1 month ago

Now i can receive the SMS but still get error when validating the 2FA.

Some errors extracted from JS/HTML:

  1. "error_21666": "Enter the last code you received, use one of your devices, or try again later."
  2. "graphite.securitycode.error.invalid": "The verification code you entered is not valid."
  3. "graphite.verify.device.exceeded.device.attempts.text": "You have entered an incorrect verification code too many times. Try again later."

This the output of the app in konsole (i have obfuscated some date (mail/phone):

<script type="application/json" class="boot_args">
    {"direct":{"headers":{"X-Mme-Client-Info":"\u003CMacBookPro13,2\u003E \u003CmacOS;13.1;22C65\u003E \u003Ccom.apple.AuthKit/1 (com.apple.dt.Xcode/3594.4.19)\u003E"},"phoneNumberVerification":{"trustedPhoneNumbers":[{"numberWithDialCode":"+XX ••• ••• ••YY","pushMode":"sms","obfuscatedNumber":"••• ••• ••YY","lastTwoDigits":"YY","id":1}],"phoneNumber":{"numberWithDialCode":"••• ••• ••• ••YY","pushMode":"sms","obfuscatedNumber":"••• ••• ••YY","lastTwoDigits":"YY","id":1},"securityCode":{"length":6,"tooManyCodesSent":false,"tooManyCodesValidated":false,"securityCodeLocked":false,"securityCodeCooldown":false},"mode":"sms","type":"verification","authenticationType":"hsa2","recoveryUrl":"https://gsa.apple.com/iforgot/phone/add?prs_account_nm=someone%40somedomain.com\u0026autoSubmitAccount=true\u0026appId=93","cantUsePhoneNumberUrl":"https://gsa.apple.com/iforgot/phone/add?context=cantuse\u0026prs_account_nm=someone%40somedomain.com\u0026autoSubmitAccount=true\u0026appId=93","dontHaveAccessUrl":"https://gsa.apple.com/iforgot/phone/add?context=donthaveaccess\u0026prs_account_nm=someone%40somedomain.com\u0026autoSubmitAccount=true\u0026appId=93","recoveryWebUrl":"https://iforgot.apple.com/password/verify/appleid?prs_account_nm=someone%40somedomain.com\u0026autoSubmitAccount=true\u0026appId=93","repairPhoneNumberUrl":"https://gsa.apple.com/appleid/account/manage/repair/verify/phone","repairPhoneNumberWebUrl":"https://appleid.apple.com/widget/account/repair?#!repair","noTrustedDevices":true,"aboutTwoFactorAuthenticationUrl":"https://support.apple.com/kb/HT204921","autoVerified":false,"showAutoVerificationUI":false,"supportsCustodianRecovery":false,"hideSendSMSCodeOption":false,"supervisedChangePasswordFlow":false,"supportsRecovery":true,"trustedPhoneNumber":{"numberWithDialCode":"+XX ••• ••• ••YY","pushMode":"sms","obfuscatedNumber":"••• ••• ••YY","lastTwoDigits":"YY","id":1},"hsa2Account":true,"restrictedAccount":false,"managedAccount":false},"hasRecoveryKey":false,"verifyClientType":"phone","sourceAppId":93,"locale":"en","localizeStrings":{"graphite.verify.device.exceeded.attempts":"Too Many Verification Attempts","graphite.recoverykey.lostkey.alert.body":"If you do not have access to a trusted device or your Recovery Key, you can skip this step and set up iCloud, and other services after setup is complete.","error_21666":"Enter the last code you received, use one of your devices, or try again later.","graphite.recoverykey.lostkey.alert.title":"You can’t sign in right now.","graphite.button.text.back":"Back","graphite.button.text.skip":"Skip","graphite.macbuddy.auth.verification.subtitle":"This Apple ID is protected with two-step verification. Please verify your identity to continue.","graphite.verify.device.exceeded.recovery.key.attempts.text":"You have entered an incorrect Recovery Key too many times. Try again later.","graphite.securitycode.error.invalid":"The verification code you entered is not valid.","graphite.button.text.cancel":"Cancel","graphite.recoverykey.error.invalid":"Invalid recovery key.","graphite.button.text.continue":"Continue","graphite.verify.device.exceeded.device.attempts.text":"You have entered an incorrect verification code too many times. Try again later.","graphite.button.text.ok":"OK","graphite.challenge.header":"Verify your identity","graphite.button.text.verify":"Verify"},"displayFeatures":{"enableRightToLeftDisplay":false},"manualFlow":false,"authClientType":"graphite","client":{"qualifiedDeviceClass":"MacBookPro"},"isPiggybackingFlow":false,"authInitialRoute":"auth/verify/phone/securitycode"},"additional":{}}
</script>
<script type="application/json" class="localization_strings">
    [{"key":"button.next","value":"Next","shouldEscape":true},{"key":"button.back","value":"Back","shouldEscape":true},{"key":"button.continue","value":"Continue","shouldEscape":true},{"key":"button.cancel","value":"Cancel","shouldEscape":true},{"key":"button.ok","value":"OK","shouldEscape":true},{"key":"button.verify","value":"Verify","shouldEscape":true},{"key":"error.unexpected","value":"Failed to verify your identity. Try again.","shouldEscape":true},{"key":"error.unknown","value":"Unexpected error occurred, please try again.","shouldEscape":true},{"key":"subtitle.macbuddy","value":"Sign in to use iCloud, the App Store, Apple services, and more.","shouldEscape":true},{"key":"title.macbuddy","value":"Sign In with Your Apple ID","shouldEscape":true},{"key":"expired.alert.title","value":"Cannot Sign In","shouldEscape":true},{"key":"expired.alert.message","value":"Your Apple ID password and verification code could not be verified. Try signing in again.","shouldEscape":true},{"key":"graphite.verify.device.exceeded.device.attempts.text","value":"You have entered an incorrect verification code too many times. Try again later.","shouldEscape":true},{"key":"label.january","value":"January","shouldEscape":true},{"key":"label.february","value":"February","shouldEscape":true},{"key":"label.march","value":"March","shouldEscape":true},{"key":"label.april","value":"April","shouldEscape":true},{"key":"label.may","value":"May","shouldEscape":true},{"key":"label.june","value":"June","shouldEscape":true},{"key":"label.july","value":"July","shouldEscape":true},{"key":"label.august","value":"August","shouldEscape":true},{"key":"label.september","value":"September","shouldEscape":true},{"key":"label.october","value":"October","shouldEscape":true},{"key":"label.november","value":"November","shouldEscape":true},{"key":"label.december","value":"December","shouldEscape":true},{"key":"label.yearPrompt","value":"Year","shouldEscape":true},{"key":"label.monthPrompt","value":"Month","shouldEscape":true},{"key":"label.dayPrompt","value":"Day","shouldEscape":true},{"key":"generic.error.message","value":"Your request could not be completed at this time.","shouldEscape":true},{"key":"generic.error.title","value":"Server Error","shouldEscape":true},{"key":"verifyCreditCard.title","value":"For your security, enter the details for this card on file with Apple. Your card will not be charged.","shouldEscape":true},{"key":"verifyCreditCard.number.label","value":"Card number:","shouldEscape":true},{"key":"verifyCreditCard.number.placeholder","value":"required","shouldEscape":true},{"key":"verifyCreditCard.cvv.label","value":"Security code:","shouldEscape":true},{"key":"verifyCreditCard.cvv.placeholder","value":"required","shouldEscape":true},{"key":"verifyCreditCard.expiration.label","value":"Expires:","shouldEscape":true},{"key":"verifyCreditCard.button.action","value":"Verify","shouldEscape":true},{"key":"verifyCreditCard.button.cancel","value":"Cancel","shouldEscape":true},{"key":"intermediaryIntroPageTitle","value":"Apple ID for {0}","shouldEscape":true},{"key":"intermediaryIntroPageDefaultTitle","value":"Apple ID for your organization","shouldEscape":true},{"key":"max_attempts.title","value":"Cannot Verify Phone Number","shouldEscape":true},{"key":"phone.verification.code.alert.title","value":"Didn\u0026rsquo;t get a code?","shouldEscape":true},{"key":"phone.verification.code.alert.intro.sms","value":"If you didn\u0026rsquo;t get a verification code, a new code can be sent or you can get a phone call with a new code.","shouldEscape":true},{"key":"phone.verification.code.alert.intro.voice","value":"If you didn\u0026rsquo;t get a verification code, you can get another call or have a new code sent by a text message.","shouldEscape":true},{"key":"phone.verification.code.alert.option.resend","value":"Send new code","shouldEscape":true},{"key":"phone.verification.code.alert.option.resend.sms","value":"Send new code","shouldEscape":true},{"key":"phone.verification.code.alert.option.resend.voice","value":"Call me again","shouldEscape":true},{"key":"phone.verification.code.alert.option.voice","value":"Get a phone call","shouldEscape":true},{"key":"phone.verification.code.alert.option.sms","value":"Use text message","shouldEscape":true},{"key":"phone.verification.code.alert.option.skip","value":"Verify later","shouldEscape":true},{"key":"phone.verification.error.invalid","value":"The verification code you entered is not valid.","shouldEscape":true},{"key":"phone.verification.error.maxcodes","value":"You have sent too many codes to verify your phone number.","shouldEscape":true},{"key":"phone.verification.code.alert.option.cantuse","value":"Can’t use this number","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.title","value":"Apple ID Account Recovery","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.description","value":"If you don’t have access to this phone number, it may take up to a week to regain access to your account.","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.multiple.description","value":"If you don’t have access to these phone numbers, it may take up to a week to regain access to your account.","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.button.action","value":"Start Account Recovery","shouldEscape":true},{"key":"no_device_code.title","value":"Didn\u0026rsquo;t get a code?","shouldEscape":true},{"key":"no_device_code.description","value":"If you didn\u0026rsquo;t get a verification code, a new one can be sent or you can have one sent to your phone number.","shouldEscape":true},{"key":"no_device_code.option.resend","value":"Send new code","shouldEscape":true},{"key":"no_device_code.option.sms","value":"Get a text message","shouldEscape":true},{"key":"no_device_code.option.voice","value":"Get a phone call","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.managed.title","value":"Don’t have access to this phone number?","shouldEscape":true},{"key":"phone.verification.code.alert.cantuse.managed.description","value":"Contact your organization’s Administrator or Manager and ask them to reset the phone number for your Managed Apple ID.","shouldEscape":true},{"key":"phone_list.cantuse.managed.title","value":"Don\u0026rsquo;t have access to any of these numbers?","shouldEscape":true},{"key":"phone_list.subtitle","value":"Send verification code to:","shouldEscape":true},{"key":"phone_list.title","value":"A verification code is required.","shouldEscape":true},{"key":"phone_list.cantuse.managed.description","value":"Contact your organization’s Administrator or Manager and ask them to reset the phone numbers for your Managed Apple ID.","shouldEscape":true},{"key":"phone.verification.code.alert.option.different","value":"Choose different number","shouldEscape":true},{"key":"graphite.hsa2.auth.no_device_code.description.multiple_phones","value":"If you didn\u0026rsquo;t get a verification code, a new code can be sent or you can use one of your trusted phone numbers.","shouldEscape":true},{"key":"graphite.hsa2.auth.no_device_code.description.one_phone","value":"If you didn\u0026rsquo;t get a verification code, a new code can be sent or you can use your trusted phone number.","shouldEscape":true},{"key":"graphite.hsa2.auth.no_device_code.option.multiple_phones","value":"Send code to trusted number","shouldEscape":true},{"key":"graphite.hsa2.auth.no_device_code.option.one_phone.sms","value":"Text code to {0}","shouldEscape":true},{"key":"graphite.hsa2.auth.no_device_code.option.one_phone.voice","value":"Call {0}","shouldEscape":true},{"key":"graphite.hsa2.auth.to_many_verification_attempts.title","value":"Too many verification codes attempts.","shouldEscape":true},{"key":"graphite.hsa2.auth.to_many_verification_attempts.body","value":"You have entered an incorrect verification code too many times. You can try signing in again later in System Preferences.","shouldEscape":true},{"key":"graphite.hsa2.auth.to_many_verification_attempts.body.settings","value":"You have entered an incorrect verification code too many times. You can try signing in again later in System Settings.","shouldEscape":true},{"key":"graphite.hsa2.auth.to_many_verification_attempts.button.sign_in_later","value":"Sign In Later","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.title","value":"Enter the verification code sent to your other devices.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.AppleTV.title","value":"Enter the verification code sent to your Apple TV.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.MacBook.title","value":"Enter the verification code sent to your MacBook.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.MacBookAir.title","value":"Enter the verification code sent to your MacBook Air.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.MacBookPro.title","value":"Enter the verification code sent to your MacBook Pro.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.MacPro.title","value":"Enter the verification code sent to your Mac Pro.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.Macmini.title","value":"Enter the verification code sent to your Mac mini.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.PC.title","value":"Enter the verification code sent to your PC.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.Watch.title","value":"Enter the verification code sent to your Apple Watch.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.iMac.title","value":"Enter the verification code sent to your iMac.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.iPad.title","value":"Enter the verification code sent to your iPad.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.iPhone.title","value":"Enter the verification code sent to your iPhone.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.iPod.title","value":"Enter the verification code sent to your iPod.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.AppleTV.title","value":"Enter the verification code sent to your other Apple TV.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.MacBook.title","value":"Enter the verification code sent to your other MacBook.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.MacBookAir.title","value":"Enter the verification code sent to your other MacBook Air.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.MacBookPro.title","value":"Enter the verification code sent to your other MacBook Pro.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.MacPro.title","value":"Enter the verification code sent to your other Mac Pro.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.Macmini.title","value":"Enter the verification code sent to your other Mac mini.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.PC.title","value":"Enter the verification code sent to your other PC.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.Watch.title","value":"Enter the verification code sent to your other Apple Watch.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.iMac.title","value":"Enter the verification code sent to your other iMac.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.iPad.title","value":"Enter the verification code sent to your other iPad.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.iPhone.title","value":"Enter the verification code sent to your other iPhone.","shouldEscape":true},{"key":"graphite.hsa2.auth.trustedDevices.single.other.iPod.title","value":"Enter the verification code sent to your other iPod.","shouldEscape":true},{"key":"graphite.security.nonPhishable.auth.prompt.title","value":"Use Your Security Key","shouldEscape":true},{"key":"graphite.security.nonPhishable.auth.prompt.header","value":"Apple ID","shouldEscape":true},{"key":"graphite.security.nonPhishable.auth.prompt.body","value":"To sign in, insert and activate your security keys.","shouldEscape":true},{"key":"graphite.button.text.cancel","value":"Cancel","shouldEscape":true},{"key":"graphite.security.nonPhishable.incompatible.window.title","value":"Access your data on iCloud.com","shouldEscape":true},{"key":"purple.hsa2.auth.verify.trusted.phone.number.title","value":"Verification Code","shouldEscape":true}]
</script>

        <!-- only including on fe dev -->
                    <script type="text/javascript" src="https://gsa.apple.com/auth/static/jsj/N1601442585/graphite/auth/app_hsa2.js" ></script>
</body>
</html>

...thentication.tfaslide ERROR 2024-05-31T20:35:20.155 Apple auth error: 

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <style>
        [data-ui-action=keep] {
            display: none;
        }
    </style>
</head>
<body>
<div data-ui-action="keep">
        <span id="messageText">
             Error
        </span>
    <span id="informativeText">
            Cannot connect to iCloud. Try again later.
        </span>
</div>

<script type="application/json" id="service_errors">
    { "serviceErrors": null }
</script>
        <script type="text/javascript" src="https://gsa.apple.com/auth/static/jsj/N1350635055/graphite/auth/boot/error.js" ></script>

</body>
</html>
 (415)

(sideloader-gtk-x86_64-linux-gnu:16617): Gtk-WARNING **: 20:35:20.155: Failed to set text '<span foreground="red">

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <style>
        [data-ui-action=keep] {
            display: none;
        }
    </style>
</head>
<body>
<div data-ui-action="keep">
        <span id="messageText">
             Error
        </span>
    <span id="informativeText">
            Cannot connect to iCloud. Try again later.
        </span>
</div>
<script type="application/json" id="service_errors">
    { "serviceErrors": null }
</script>
        <script type="text/javascript" src="https://gsa.apple.com/auth/static/jsj/N1350635055/graphite/auth/boot/error.js" ></script>
</body>
</html>
 (415)</span>' from markup due to error parsing markup: Error on line 25 char 8: Element “head” was closed, but the currently open element is “meta”
adm1ncooler commented 1 week ago

Hello, any update on this?

Dadoum commented 1 week ago

Unfortunately no (I don't have time right now to work on this :( )

bitxeno commented 1 week ago

I have make some tests, hoping useful to you.

I try send body format:

{
  "securityCode": {
    "code": "xxx"
  },
  "phoneNumber": {
    "id": 1
  },
  "mode": "sms"
}

with set content-type to application/json.

The sms verify api can return success code 200 and login success.

Dadoum commented 1 week ago

I wrote some code to perform your request @bitxeno

adm1ncooler commented 2 days ago

I wrote some code to perform your request @bitxeno

I tested it now I get this error on Validate the SMS code:

 server.developersession ERROR 2024-06-29T17:27:37.287 DeveloperSession creation failed: This action cannot be completed at this time
...entication.loginslide ERROR 2024-06-29T17:27:37.287 Apple auth error: This action cannot be completed at this time (-22411)
Dadoum commented 1 day ago

I tested it now I get this error on Validate the SMS code:

 server.developersession ERROR 2024-06-29T17:27:37.287 DeveloperSession creation failed: This action cannot be completed at this time
...entication.loginslide ERROR 2024-06-29T17:27:37.287 Apple auth error: This action cannot be completed at this time (-22411)

This is unrelated to that issue, Apple servers thinks your device is not trustworthy. You can reset your device identity by removing ~/.config/Sideloader/device.json

bitxeno commented 9 hours ago

I tested it now I get this error on Validate the SMS code:

 server.developersession ERROR 2024-06-29T17:27:37.287 DeveloperSession creation failed: This action cannot be completed at this time
...entication.loginslide ERROR 2024-06-29T17:27:37.287 Apple auth error: This action cannot be completed at this time (-22411)

This is unrelated to that issue, Apple servers thinks your device is not trustworthy. You can reset your device identity by removing ~/.config/Sideloader/device.json

I also encountered this problem. After encountering the error, I tried again and will show login success and don't ask 2FA code again. It appears that the first time login is successful despite displaying an error message.