Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with 2FA #2

Open
joanbono opened this issue Mar 24, 2022 · 13 comments
Open

Working with 2FA #2

joanbono opened this issue Mar 24, 2022 · 13 comments

Comments

@joanbono
Copy link

Hi!

Is there any way we can pass the 2FA code to ipatool-ios?

It seems with ipatool there's an option but it does not work with this tool

Thanks!

@dlevi309
Copy link
Owner

Hi there, at some point soon I’m gonna look into updating this tool to the latest version from the main repo, but until them, 2FA actually does work; you just have to add the two factor code to the end of the password entry. For example, say my two factor code is 111333 and I’m using the IPATOOL_PASSWORD environment variable.
the end result would like this in my .profile (with my password being Mypassword123),

export IPATOOL_PASSWORD=Mypassword123111333

Hope that helps for the time being. The only thing that’s stopped me is that I need to restructure the build scheme completely since the tool is now multiple swift packages rather than a single project, and I’ve just been busy.

@usmanabdurrazzaq
Copy link

This don't work anymore...

@dlevi309
Copy link
Owner

dlevi309 commented Dec 22, 2022

This don't work anymore...

I use it regularly, and just tested it less than 5 min ago, it’s working fine. (ipa is an alias for ipatool download -b)
it works fine

@usmanabdurrazzaq
Copy link

Getting an error while signing in with Apple ID, 2FA issue

@dlevi309
Copy link
Owner

Getting an error while signing in with Apple ID, 2FA issue

Try it again. You have to export you password as an environment variable, and when you get the 2FA code, add that to end of your password in your ~/.profile. Either kill terminal or run source ~/.profile and then run it again

@usmanabdurrazzaq
Copy link

7D1C86EA-5016-465B-A235-D68AC7FF9DC3

@dlevi309
Copy link
Owner

Write down the exact steps you took because I’m unsure whether or not you have had any idea what I’ve been talking about / following the steps I’ve mentioned.

@usmanabdurrazzaq
Copy link

usmanabdurrazzaq commented Dec 22, 2022

I created ~/.profile and added export IPATOOL_PASSWORD=appleidpassword2fa, killed terminal, re-launched, gives the same error.

@dlevi309
Copy link
Owner

hmm, okay, now try the exact same thing but add your email as an environment variable as well (export IPATOOL_EMAIL=“[email protected] (also, put quotations outside of the password (like =“this” rather than =this)

@usmanabdurrazzaq
Copy link

37BD466B-87EC-4F0C-B1C9-C5D5085FC850

Yo, this worked, but this has to be re-done with a new 2FA code each time...

@dlevi309
Copy link
Owner

I’m glad it started working (and it shouldn’t have to be re-done every time, maybe try again in an hour. make sure that everything else is correct in your ~/.profile, the only reason I could imagine why it wouldn’t continuously work would be because of the variable not being read before the terminal session begins. You can check if it’s indeed being read correctly by typing echo $IPATOOL_PASSWORD, that should print your pass, but try it a bit later. it also might be because you’ve requested so many 2FA codes in the past hour)

@usmanabdurrazzaq
Copy link

How long can an 2FA code be used?

@dlevi309
Copy link
Owner

dlevi309 commented Dec 22, 2022

I’ve been using the same one for over a year, once it works multiple times, it won’t stop working (but like yourself, I actually do remember having the issue of 2FA needing to be regenerated every time, but a day later I tried and it worked fine. My guess is because I regenerated so many codes that day)

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

No branches or pull requests

3 participants