Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode return https Code = 412? #1026

Open
xlxhxmz opened this issue Dec 25, 2024 · 2 comments
Labels

Comments

@xlxhxmz
Copy link

xlxhxmz commented Dec 25, 2024

Summary

 I saw that for accounts without 2FA, a 412 response was added for repair/complete in the issue. However, on my end, I passed signin/complete and even received a two-step verification prompt, but when requesting https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode, I received a 412 response.

##Context
I am using C++ API requests, and all requests are made according to the project's requirements. Other accounts did not encounter any issues, but some accounts are receiving a 412 response.
Url: https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode
curl request error.412
Response.Content{
"trustedDeviceCount" : 1,
"otherTrustedDeviceClass" : "iPhone",
"securityCode" : {
"code" : "726975",
"tooManyCodesSent" : false,
"tooManyCodesValidated" : false,
"securityCodeLocked" : false,
"securityCodeCooldown" : false,
"valid" : true
},
"phoneNumberVerification" : {
"trustedPhoneNumbers" : [ {
"numberWithDialCode" : "+48 ••• ••• •07",
"nonFTEU" : true,
"pushMode" : "sms",
"obfuscatedNumber" : "••• ••• •07",
"lastTwoDigits" : "07",
"id" : 1
} ],
"securityCode" : {
"length" : 6,
"tooManyCodesSent" : false,
"tooManyCodesValidated" : false,
"securityCodeLocked" : false,
"securityCodeCooldown" : false
},
"authenticationType" : "hsa2",
"recoveryUrl" : "https://iforgot.apple.com/phone/add?prs_account_nm=robert.mielczarek1%40gmail.com&autoSubmitAccount=true&appId=142",
"cantUsePhoneNumberUrl" : "https://iforgot.apple.com/iforgot/phone/add?context=cantuse&prs_account_nm=robert.mielczarek1%40gmail.com&autoSubmitAccount=true&appId=142",
"recoveryWebUrl" : "https://iforgot.apple.com/password/verify/appleid?prs_account_nm=robert.mielczarek1%40gmail.com&autoSubmitAccount=true&appId=142",
"repairPhoneNumberUrl" : "https://gsa.apple.com/appleid/account/manage/repair/verify/phone",
"repairPhoneNumberWebUrl" : "https://appleid.apple.com/widget/account/repair?#!repair",
"aboutTwoFactorAuthenticationUrl" : "https://support.apple.com/kb/HT204921",
"autoVerified" : false,
"showAutoVerificationUI" : false,
"supportsCustodianRecovery" : false,
"hideSendSMSCodeOption" : false,
"supervisedChangePasswordFlow" : false,
"enableNonFTEU" : false,
"supportsRecovery" : true,
"trustedPhoneNumber" : {
"numberWithDialCode" : "+48 ••• ••• •07",
"nonFTEU" : true,
"pushMode" : "sms",
"obfuscatedNumber" : "••• ••• •07",
"lastTwoDigits" : "07",
"id" : 1
},
"hsa2Account" : true,
"restrictedAccount" : false,
"managedAccount" : false
},
"aboutTwoFactorAuthenticationUrl" : "https://support.apple.com/kb/HT204921"
}

@xlxhxmz xlxhxmz added the bug label Dec 25, 2024
@xlxhxmz
Copy link
Author

xlxhxmz commented Dec 25, 2024

That is to say, during the previous verification, I didn't get the 412 error, which indicates that the account is not one without two-step verification. However, I get the 412 error when receiving code and attempting to access the two-step verification section. I'm not sure why this happened.

@xlxhxmz
Copy link
Author

xlxhxmz commented Dec 25, 2024

There are three unusual response header fields: Location: https://appleid.apple.com/widget/account/repair?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d&rv=1&language=en_US_USA#!repair, X-Apple-Repair-Session-Token, and X-Apple-OAuth-Context. Do they indicate something to repair? I noticed these fields in a previous issue as well but didn't receive any follow-up. #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant