We want to disable two-factor authentication for iOS account that is used only by our build machine to compile, test, and upload build to Apple.
Then we realize that it is not possible anymore according to the documentation:
Can I turn off two-factor authentication after I’ve turned it on?
If you already use two-factor authentication, you can no longer turn it off. Certain features in the latest versions of iOS and macOS require this extra level of security, which is designed to protect your information. If you recently updated your account, however, you can unenroll for a period of two weeks. Just open your enrollment confirmation email and click the link to return to your previous security settings. Keep in mind, this makes your account less secure and means that you can't use features that require a higher level of security. ref
And we read about this on the Fastlane's doc. It looks like we can have a valid session for a month. But that is not ideal either since we don't want to manually go through the 2-factor authentication every month.
The session should be valid for about one month, however, there is no way to test this without actually waiting for over a month. ref
I am wondering how is everyone else is doing this? Is there a hacky way of disabling 2-factor authentication somehow?
Update Jun 8, 2020: It is still not possible to disabled 2FA once it is enabled. We ended up creating a new apple account without 2FA not being enabled at the first place.
You can't turn off two-factor authentication, but you should be able to use an app-specific password.