Skip to content

Sign-in never completes: 2FA code accepted but the state stays REQUIRE_2FA on a secondaryAuth account #236

Description

@davidcoulson

Exporter 1.5.1 from source (02fd88e), macOS 26.7, iCloud route.

Sign-in reaches 2FA, I enter the code, Apple takes it — and then the re-auth behind it comes back still asking for 2FA. It loops until it gives up.

INFO  Detected 2FA requirement: secondaryAuth
INFO  Transitioning login state: LoginState.REQUIRE_2FA -> LoginState.REQUIRE_2FA
INFO  Apple took the code and then failed to finish signing in:
      Unexpected state after submitting 2FA: LoginState.REQUIRE_2FA

Not #168. There is no 503 anywhere in the log and I'm on the akd fix. I checked the edge block separately and it behaves as you described: Xcode gets 503, akd gets 401.

My account comes back as au = secondaryAuth rather than trustedDeviceSecondaryAuth, so only SMS was offered. Six attempts over an hour, with the built-in anisette and with a local anisette-v3 server, identical every time.

So I patched trusted_device_2fa = True to force the trusted-device flow. Got the code on my Mac, entered it, same result exactly. It isn't the SMS channel.

Two things worth separating:

  1. The sign-in never completes on a secondaryAuth account.
  2. Whatever the cause, it gets classified as the spent-code 503 path, so it waits and sends a fresh code, over and over. I burned a dozen codes before reading the log and realising nothing was going to change.

Happy to run anything you want to try.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions