Closed boredazfcuk closed 6 days ago
Multifactor authentication information missing from cookie
is not part of the codebase in this project. Do you mind posting output from icloudpd
itself (binary/docker preferable over src) to reduce the number of variables.
The output from the icloudpd binary was just this bit at the top:
2024-11-09 17:02:49 DEBUG Authenticating...
2024-11-09 17:02:52 INFO Two-factor authentication is required (2fa)
a: ***** ****01
b: ***** ****02
Please enter two-factor authentication code or device index (a..b) to send SMS with a code: a
Please enter two-factor authentication code that you received over SMS: 060488
2024-11-09 17:03:10 ERROR Failed to verify two-factor authentication code
The bit beneath is just a check to make sure the cookie is MFA capable. When MFA authentication is successful 'X-APPLE-WEBAUTH-HSA-TRUST' gets added to the cookie, so I just check it's present... basically just:
if [ "$(grep -c "X-APPLE-WEBAUTH-HSA-TRUST" "/config/${cookie_file}")" -eq 1 ]; then
LogInfo "Multifactor authentication cookie generated. Sync should now be successful"
else
LogError "Multifactor authentication information missing from cookie. Authentication has failed"
LogError " - Was the correct password entered?"
LogError " - Was the multifactor authentication code mistyped?"
LogError " - Can you log into ${icloud_domain} without receiving pop-up notifications?"
fi
Your suspicion on dropping leading zeros for sms code was right.
Great stuff
Overview
Received an MFA code and input it, but authentication failed.
I've definitely entered the code correctly... but I've noticed that the code starts with a 0... was just wondering if it's that bug where it strips leading zeros again? Was thinking it may be worth checking... if it's not a reoccurrence of that issue, then just close the issue.