Skip to content

Fix App Store auth endpoint handling#490

Open
b-nnett wants to merge 1 commit into
majd:mainfrom
b-nnett:codex/dynamic-auth-endpoint
Open

Fix App Store auth endpoint handling#490
b-nnett wants to merge 1 commit into
majd:mainfrom
b-nnett:codex/dynamic-auth-endpoint

Conversation

@b-nnett

@b-nnett b-nnett commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Apple moved the App Store login endpoint and changed where authenticateAccount appears in the Bag response.

This patch updates login to:

  • read authenticateAccount from both the Bag root and urlBag
  • normalize native auth URLs to /auth/v1/native/fast/
  • fall back to the native auth endpoint when Bag does not return one
  • keep response metadata when XML decoding fails
  • retry once with a native auth URL found in a non-plist response body

Notes

One detail from testing: https://auth.itunes.apple.com/auth/v1/native/fast returned an HTML redirect for me, while ...native/fast/ (with a trailing slash) reached MZAuth and completed login.

Validation

  • go generate ./...
  • go test ./...
  • built the CLI locally
  • confirmed ipatool auth login succeeds with a live Apple ID

@b-nnett b-nnett changed the title Fix dynamic App Store auth endpoint discovery Fix App Store auth endpoint handling Jun 10, 2026
@b-nnett b-nnett marked this pull request as ready for review June 10, 2026 05:04
@9021007

9021007 commented Jun 10, 2026

Copy link
Copy Markdown
image

not loving the AI, but I was able to log in, download an app, and install it.

@k1rp14 k1rp14 mentioned this pull request Jun 10, 2026
efibalogh added a commit to efibalogh/ipadecrypt that referenced this pull request Jun 10, 2026
Resolve issues with App Store authentication by implementing dynamic auth endpoint discovery. If the initial auth request fails due to endpoint redirects or changes, the client parses the XML plist unmarshal error for any new authentication endpoint and automatically retries the login.

Ported from the fix in ipatool (majd/ipatool#490).
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.

2 participants