fix: handle Apple's new trustedPhoneNumbers location in auth response#1325
Open
matzekl wants to merge 1 commit intoicloud-photos-downloader:masterfrom
Open
fix: handle Apple's new trustedPhoneNumbers location in auth response#1325matzekl wants to merge 1 commit intoicloud-photos-downloader:masterfrom
matzekl wants to merge 1 commit intoicloud-photos-downloader:masterfrom
Conversation
Apple moved trustedPhoneNumbers from twoSV.phoneNumberVerification to twoSV.bridgeInitiateData.phoneNumberVerification in their auth page HTML (observed with iOS 26.4+). This caused get_trusted_phone_numbers() to return an empty list, hiding the SMS 2FA option and leaving users with no way to authenticate (since iOS 26 also removed the manual "Get Verification Code" button from Settings). The fix checks both locations, falling back to bridgeInitiateData when the original path returns no results. Fixes icloud-photos-downloader#1322 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
billimek
approved these changes
Mar 29, 2026
|
I run it with two accounts. One is connected to an iPhone with iOS 26.3 and the 2nd one with iOS 26.4. |
Contributor
|
Nice, can we merge it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trustedPhoneNumbersfromtwoSV.phoneNumberVerificationtotwoSV.bridgeInitiateData.phoneNumberVerificationin the HTML response fromhttps://idmsa.apple.com/appleauth/authget_trusted_phone_numbers()to return an empty list, hiding the SMS 2FA option entirelybridgeInitiateDatawhen the original path is emptyFixes #1322
How I found this
Captured the actual Apple auth response and compared the JSON structure to what the parser expects:
Test plan
a: (***) ***-**88) now appears in the 2FA prompt🤖 Generated with Claude Code