Skip to content

auth login succeeds but download immediately fails with password token is expired #498

@yanashenyang

Description

@yanashenyang

What happened?

auth login succeeds but download immediately fails with password token is expired

Environment

Summary

After Apple's recent App Store auth changes, I tested several auth-fix PR branches. Some branches can make auth login succeed, but download immediately fails with:

error="password token is expired"

This happens immediately after a clean login, even after removing local cookies.

Reproduction

rm -f ~/.ipatool/cookies ~/.ipatool/cookies.lock

ipatool auth revoke
ipatool auth login -e "<APPLE_ID>" -p "<PASSWORD>" --verbose

ipatool download --app-id 951937596 --non-interactive --verbose

Observed Result

auth login reports success:

INF email=<redacted> name="<redacted>" success=true

But download immediately fails:

DBG error="password token is expired"
ERR error="password token is expired" success=false

Additional Tests

I also tested splitting the flow into purchase then download:

ipatool purchase -b com.microsoft.Office.Outlook --non-interactive --verbose
ipatool download --app-id 951937596 --non-interactive --verbose

The script reaches the download step, but download still fails with:

error="password token is expired"

I also tried clearing cookies before each login:

rm -f ~/.ipatool/cookies ~/.ipatool/cookies.lock

No change.

Branch-Specific Observations

Expected Result

After auth login succeeds, download should be able to use the issued token and download the IPA, or the login command should fail if the returned token is not valid for downloads/purchase.

Questions

Is the token returned by the new auth endpoint only valid for login/account info but not for App Store download/purchase?

Is there an additional step needed after auth login to obtain a commerce-grade token usable by download / purchase?

Version

release 2.3.0

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions