2FA loop: Apple no longer honors the Xcode 11.2 client identity (`com.apple.dt.Xcode/3594.4.19`)

Abierto Apto para principiantes
#1,772 1 comentario 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@EdmundFu-233 ya está trabajando en esto.

Desde el 15/9/2026.

  • #1801 de @EdmundFu-233 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
swift

Línea de trabajo

Comienza en AnisetteDataManager.swift:249, donde la ruta de AOSKit deriva el modelo, la versión del sistema operativo y el build, y compárala con la ruta de VM/anisette-server. Asegúrate de que la identidad del cliente resultante sea coherente, conservando los valores de modelo y OS derivados localmente, y usa después el harness sign-in-only para confirmar que el retry se completa correctamente sin otro desafío secondaryAuth.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Sign-in gets stuck in a loop that looks like a 2FA bug. Apple accepts the verification code
(HTTP 200), but the next SRP login is challenged again with hsc=409 / au=secondaryAuth, so
re-entering codes never helps. Same symptom as #1737 and SideStore#1247.

Cause

X-MMe-Client-Info describes Xcode 11.2 (2019) on macOS 13.1. Apple appears to validate that the
triple is internally consistent before granting HSA2 trust, and Xcode 11.2 / a current Xcode on
macOS 13.1 is not a combination that can exist.

Measured on macOS 27 with the PR #1770 anisette VM:

X-MMe-Client-Info result
<MacBookPro13,2> <macOS;13.1;22C65> … (com.apple.dt.Xcode/3594.4.19)> — current behaviour 409 secondaryAuth; code accepted, retry still 409
<MacBookPro13,2> <macOS;13.1;22C65> … (com.apple.dt.Xcode/25183.54.10)> 409 secondaryAuth; same loop
<Mac17,3> <macOS;27.0;26A5416b> … (com.apple.dt.Xcode/25183.54.10)> 200, au absent, Xcode token issued

The stale value reaches Apple because anisette sources report it and
ALTAnisetteData(anisetteServerResponse:) copies X-MMe-Client-Info verbatim:

  • PR #1770's Linux VM reports <MacBookPro13,2> <macOS;13.1;22C65> … 3594.4.19>
  • All five servers in anisette-servers.json report the same string (checked via /v3/client_info)
Fix

One file. AnisetteDataManager.swift:249 already derives the model, OS version, and build from
ProcessInfo for the AOSKit path. Using that same derived string for the VM/anisette-server path,
with the Xcode version bumped, is sufficient:

<Mac17,3> <macOS;27.0;26A5416b> <com.apple.AuthKit/1 (com.apple.dt.Xcode/25183.54.10)>

Only the Xcode version is pinned; model and OS come from the machine.

Notes
  • No AltSign change is needed. Verified with AltSign stock — X-Xcode-Version: 11.2 (11B41)
    and User-Agent: akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0 unchanged. Stale, but not
    load-bearing.
  • The SMS fallback is a symptom, not a separate bug. On a fresh, untrusted machine (deleted
    adi.pb/identifier, let the guest re-provision), a coherent identity made Apple return
    trustedDeviceSecondaryAuth instead of secondaryAuth. The existing
    requestTrustedDeviceTwoFactorCode path handled it unmodified and the retry returned 200.
  • iOS needs a different form of the same fix. FetchAnisetteDataOperation on classic also
    takes the server's client info verbatim, but has no local Mac to derive from, so it would need a
    pinned coherent triple. iSideload does this (isideload/src/anisette/remote_v3/mod.rs).
  • Confirmed on AltServer (macOS 27) and AltStore Classic 2.3b2 with a remote anisette server.
  • Tested with a sign-in-only harness — no device, certificates, or install — so each field could
    be varied independently.

Happy to open a PR against marketplace if this looks like the right approach.

Investigated with Claude Code.

Lenguaje dominante
Swift
Estrellas
15.1k
Forks
1.8k
Merge medio
5 d 16 h
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de altstoreio/AltStore

Todos los issues de altstoreio/AltStore

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.