From 06d79cc8b22560fb68afabfa83e304ef81973f6d Mon Sep 17 00:00:00 2001 From: Grega Kespret Date: Mon, 26 Oct 2026 09:07:33 +0100 Subject: [PATCH 1/2] Pin apple-private-apis: a wrong SMS code can be retyped 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; the console callers in src/test.rs ignore the prompt. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01JvDrSTtCSuxsh3iMaZ8sPX --- apple-private-apis | 2 +- src/test.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apple-private-apis b/apple-private-apis index d0832be..56f0dea 160000 --- a/apple-private-apis +++ b/apple-private-apis @@ -1 +1 @@ -Subproject commit d0832be473a6753846d95fd70b66e6f1a291f68d +Subproject commit 56f0dead30c37b89a549df3690e4187824445711 diff --git a/src/test.rs b/src/test.rs index 5e5e5fa..936105f 100644 --- a/src/test.rs +++ b/src/test.rs @@ -346,11 +346,11 @@ async fn main() { state.users.clone() } else { // ask console for 2fa code, make sure it is only 6 digits, no extra characters - let tfa_closure = |_sent_to: Option<&str>| { + let tfa_closure = |_prompt: icloud_auth::TfaPrompt| { println!("Enter 2FA code: "); let mut input = String::new(); std::io::stdin().read_line(&mut input).unwrap(); - input.trim().to_string() + Some(input.trim().to_string()) }; let mut account = AppleAccount::new_with_anisette(config.get_gsa_config(&*connection.state.read().await, false), anisette_client.clone()).unwrap(); @@ -433,11 +433,11 @@ async fn main() { let conf = (gsa.user.clone(), gsa.pass.as_ref().to_vec()); let appleid_closure = move || conf.clone(); // ask console for 2fa code, make sure it is only 6 digits, no extra characters - let tfa_closure = |_sent_to: Option<&str>| { + let tfa_closure = |_prompt: icloud_auth::TfaPrompt| { println!("Enter 2FA code: "); let mut input = String::new(); std::io::stdin().read_line(&mut input).unwrap(); - input.trim().to_string() + Some(input.trim().to_string()) }; let acc = AppleAccount::login(appleid_closure, tfa_closure, From ba58bddf4947c0d03ab45f908e2cc629eec010ad Mon Sep 17 00:00:00 2001 From: Grega Kespret Date: Fri, 6 Nov 2026 11:24:04 +0100 Subject: [PATCH 2/2] Pin apple-private-apis 28fde51: retype only a plain wrong code 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 Claude-Session: https://claude.ai/code/session_018qVCoJNNwwmBEafaSpCBiG --- apple-private-apis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple-private-apis b/apple-private-apis index 56f0dea..28fde51 160000 --- a/apple-private-apis +++ b/apple-private-apis @@ -1 +1 @@ -Subproject commit 56f0dead30c37b89a549df3690e4187824445711 +Subproject commit 28fde5160af4238a5d28799c2209d5fd1af5f2ad