Skip to content

Pin apple-private-apis: a wrong SMS code can be retyped - #15

Merged
gregakespret merged 2 commits into
fix/mac-escrow-identityfrom
fix/retype-wrong-sms-code
Nov 6, 2026
Merged

gregakespret merged 2 commits into
fix/mac-escrow-identityfrom
fix/retype-wrong-sms-code

Conversation

@gregakespret

@gregakespret gregakespret commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Moves the apple-private-apis submodule to 28fde51, the head of gregakespret/apple-private-apis#8. With it, a wrong SMS code that Apple will take another try for (-21669) no longer fails AppleAccount::login. The login asks the 2FA prompt again for the same text, and no new text is sent.

The 2FA closure becomes Fn(TfaPrompt) -> Option<String>. TfaPrompt carries the texted phone, as before, and refused, how many codes Apple has refused for this text. The two console closures in src/test.rs ignore the prompt and wrap their input in Some. The library itself has no other callers of the closure.

cargo test --lib: 13 passed. cargo check --bin rustpush-test --features macos-validation-data passes. The rustpush-test binary's own #[test] fn test() ends in an unconditional panic!, so a full cargo test fails on it, with or without this change.

Unverified against Apple: whether the same sign-in accepts a second code. Apple's -21669 reply invites one ("Try entering your verification code again."), and the first production retype will show it.

Merge after apple-private-apis#8, with a merge commit, not a squash. gregakespret/export-findmy#28 pins Cargo.lock to ba58bdd, this PR's head, on fix/mac-escrow-identity, and a merge commit keeps that commit on the branch.

This conflicts with #9, which changes the same closure argument to CodeSentTo.

🤖 Generated with Claude Code

https://claude.ai/code/session_018qVCoJNNwwmBEafaSpCBiG

On Apple's -21669 ("Try entering your verification code again.") the
login now asks for the code again for the same text instead of failing
with Bad2faCode. The 2FA closure takes a TfaPrompt (the texted phone,
plus how many codes Apple has refused for this text) and returns
Option<String>; the console callers in src/test.rs ignore the prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JvDrSTtCSuxsh3iMaZ8sPX
Moves the submodule to the head of apple-private-apis#8, which retypes
a refused code only when -21669 is Apple's sole reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qVCoJNNwwmBEafaSpCBiG
@gregakespret
gregakespret merged commit ae5f73e into fix/mac-escrow-identity Nov 6, 2026
8 checks passed
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