ipatool icon indicating copy to clipboard operation
ipatool copied to clipboard

Unable to login with 2FA

Open xBiei opened this issue 5 years ago • 36 comments

I'm trying to download an ipa like any user I guess.. but the problem is that I can't get past the authentication, my appleid has 2FA I don't know what's the default approach here, this is the first time I try this. anyway when I put my appleid and password, it instantly gives me unknown error.. I tried debug log but it made this even more weird. this is a screenshot of what's happening:

image

xBiei avatar Nov 05 '21 00:11 xBiei

Experiencing the same thing, also tried using --auth-code with code sent through SMS/device

morpig avatar Nov 05 '21 07:11 morpig

Could you try logging in with that account on https://appleid.apple.com and see if you get any unusual behavior?

majd avatar Nov 05 '21 08:11 majd

No unusual behaviour, even tried to disable 2FA from appleid.apple.com. Didn't find any options to do so, do you know if it's possible to disable 2FA?

After executing download command from ipatool, there is 2FA prompt on both my phone & laptop (are you accessing from xx city?, and show 6-digit code). Tried entering 6-digit code with --auth-code, but it triggers the 2FA flow again.

morpig avatar Nov 05 '21 08:11 morpig

Could you try logging in with that account on https://appleid.apple.com and see if you get any unusual behavior?

no unusual behavior, logging in sends 2FA code to linked devices and requires you to type the code to continue logging.. tried it with multiple accounts but no luck. as we know there's no way to disable 2FA so this should be fixed from within the tool

xBiei avatar Nov 05 '21 20:11 xBiei

Experiencing the same thing on an M1 mac mini

MrPigglet avatar Nov 05 '21 21:11 MrPigglet

I think I figured out what the issue is. Could you test release v1.0.7 and let me know if it resolves the issue for you?

majd avatar Nov 05 '21 21:11 majd

Hello, i have the same error when i try to login. I tried with version 1.0.7, same thing.

JeuFore avatar Nov 05 '21 22:11 JeuFore

I think I figured out what the issue is. Could you test release v1.0.7 and let me know if it resolves the issue for you?

No luck. It's the exact same issue.. ipatool should await for user to input 2FA code and if that's fulfilled, proceed. but what's happening now is that it is proceeding without awaiting at all..

xBiei avatar Nov 05 '21 22:11 xBiei

I just saw the commit. you only changed the user-agent. but I think that's totally irrelevant to the issue here.

xBiei avatar Nov 05 '21 22:11 xBiei

Can also confirm that 1.0.7 did not fix the issue.

What xBiei said seems like it would work, but I understand it may be hard to implement.

MrPigglet avatar Nov 05 '21 22:11 MrPigglet

I'm debugging the issue right now, I'll see what I can do.

xBiei avatar Nov 05 '21 22:11 xBiei

Using an app-specific password does not work either, it does not ping your device to enter 2FA though.

MrPigglet avatar Nov 05 '21 22:11 MrPigglet

Using an app-specific password does not work either, it does not ping your device to enter 2FA though.

yeah app-specific passwords doesn't need 2FA to work because you can't make one without authenticating first. anyway these password can't be used with this tool & probably any tool that needs your apple id auth. app-specific passwords don't have enough permissions to do the job soooo that's a no no.. :l

xBiei avatar Nov 05 '21 22:11 xBiei

ok so after digging up trying to find the issue, looks like the 2FA problem is easy to fix by using the tool once then noting the auth code and merging it to your password without spaces (PasswordAuth). That way there's no 2FA request sent to your devices which means the 2FA problem is gone but needs to be implemented manually by the user for now at least. Reference

This is the error: MZFinance.BadLogin.Configurator_message The error is weird but we're not the only ones.. The error is connected to the 2FA somehow even though it's not asking for 2FA anymore..

Also, I noticed that to send the request to apple you need to add guid, which is the MAC address of en0. That shouldn't be a problem but I don't know about hackintosh users.

That's what I can do today I'm so tired of blowing my mind because I never used swift but willing to...

xBiei avatar Nov 06 '21 01:11 xBiei

The tool does already wait for 2FA input before proceeding, but it was receiving an error from the authentication endpoint before it reaches that point. It’s the error that @xBiei mentioned: MZFinance.BadLogin.Configurator_message. I assumed that they’re blocking older clients from the API. I’ll have another look soon. Which Mac model and macOS version are you using?

majd avatar Nov 06 '21 08:11 majd

M1 Mac Mini, latest macOS Monterey (12.0.1)

MrPigglet avatar Nov 06 '21 09:11 MrPigglet

it was receiving an error from the authentication endpoint before it reaches that point.

yeah, the tool expects one of those guys: https://github.com/majd/ipatool/blob/f3a54098eaa35bb531aa08607a6e160c20985e87/Source/Store/StoreResponse.swift#L30-L40 but it seems like it's getting a different error so it'll just give you unknownError. The weird thing is that it's not getting an error, it's getting a message.. I tried printing some text if an error has occurred here https://github.com/majd/ipatool/blob/f3a54098eaa35bb531aa08607a6e160c20985e87/Source/Store/StoreResponse.swift#L59-L60 but it's not printing anything. instead, it's getting a message which is MZFinance.BadLogin.Configurator_message I guess it's about something that isn't supported anymore by the API or whatever the response is coming from..

Which Mac model and macOS version are you using?

Hackintosh (Model: MacBookPro15,4) on macOS Monterey (12.0.1)

xBiei avatar Nov 06 '21 09:11 xBiei

looks like the 2FA problem is easy to fix by using the tool once then noting the auth code and merging it to your password without spaces (PasswordAuth).

that worked for me with version 1.07.

iWhacko avatar Nov 19 '21 11:11 iWhacko

looks like the 2FA problem is easy to fix by using the tool once then noting the auth code and merging it to your password without spaces (PasswordAuth).

that worked for me with version 1.07.

Confirming, so for example: ipatool download -e [EMAIL] -p [PASSWORD][CODE] -d iPhone --auth-code [CODE] -b com.ftband.mono will work after second attempt, when you will get 2FA code

fylfot avatar Nov 24 '21 12:11 fylfot

It doesn't works for me

Mikasa-san avatar Nov 29 '21 05:11 Mikasa-san