Skip to content

Ask for the trusted-device code when Apple will not text one - #9

Open
gregakespret wants to merge 1 commit into
findmy-export-supportfrom
fix/device-code-when-sms-refused
Open

gregakespret wants to merge 1 commit into
findmy-export-supportfrom
fix/device-code-when-sms-refused

Conversation

@gregakespret

Copy link
Copy Markdown
Owner

Pins apple-private-apis at 97f8330 (gregakespret/apple-private-apis#5). With this pin, a login that Apple refuses to text (PUT /auth/verify/phone → 423 "This phone number cannot be used at this time") asks for the trusted-device code and checks it through verify_2fa. Before, it failed with SmsSendFailed.

The signature change breaks callers. The 2FA closure is now Fn(CodeSentTo) -> String, where CodeSentTo is Sms(Option<String>) or TrustedDevice, and it replaces Fn(Option<&str>). A consumer has to accept the new argument when it bumps. export-findmy uses it to tell the user which code to type. The two console callers in src/test.rs ignore it.

The pin must merge after apple-private-apis#5, since it points at that PR's head commit, the same way #8 did.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HW3tPgNjtZokBFXjYn8Qkn

When Apple refuses to text the code, the login now asks for the
trusted-device code instead of failing. The 2FA closure takes
CodeSentTo (Sms(masked number) or TrustedDevice) in place of
Option<&str>; the console callers in src/test.rs ignore it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HW3tPgNjtZokBFXjYn8Qkn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant