majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.34k stars 466 forks source link

ipatool not prompting 2FA code on my devices #224

Closed jonahdecker closed 8 months ago

jonahdecker commented 9 months ago

What happened?

When I run ipatool auth login -email stevejobs@apple.com (fake email for privacy) and enter my password, I am asked for a 2FA authentication code. However, I am not getting a code on any of my devices. Using the -password flag doesn't work either. This prevents me from being able to download any ipa files.

Version

2.1.3

Relevant log output

jonahdecker@Jonahs-MBP ~ % ipatool -v
ipatool version 2.1.3

jonahdecker@Jonahs-MBP ~ % ipatool auth login -email stevejobs@apple.com
1:23AM INF enter password:
1:23AM INF enter 2FA code:

1:23AM ERR error="auth code is required" success=false
e-ave commented 9 months ago

I get this too, and when i provide it via --auth-code command line, or try adding it to the end of the password (saw in another issues thread), I get this error

ERR error="Did you forget your password?" success=false

ahbou commented 9 months ago

same

ahbou commented 9 months ago

Found the issue. My password has a space in it and since I was passing it using "--password my password" it was being cut out.

majd commented 8 months ago

Make sure that your credentials are correct. You can also retrieve the 2FA code from an iOS or Mac device that is already logged in via that Apple ID - using the Settings app.

solidgonk commented 8 months ago

If anyone else stumbles on this, try using --email=name@domain.com instead of -email name@domain.com

gingerbeardman commented 1 month ago

Make sure that your credentials are correct. You can also retrieve the 2FA code from an iOS or Mac device that is already logged in via that Apple ID - using the Settings app.

Settings > Apple ID > Sign-in & Security > Two-Factor Authentication > Get Verification Code


My issue was I was using the wrong command line format, but ipatool doesn't complain when it's incorrect! And it was still prompting for 2FA after wrong password was used.

When I corrected command line format and password, my devices showed the 2FA popup.

ipatool auth login --email=my.email@domain.com --password=MyPa55w0rd!