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

Use Plivo to automate Apple two-factor authentication #15

Open
hach-que opened this issue Oct 31, 2024 · 1 comment
Open

Use Plivo to automate Apple two-factor authentication #15

hach-que opened this issue Oct 31, 2024 · 1 comment
Labels
back burner No ETA on resolution migrated from gitlab Migrated from GitLab

Comments

@hach-que
Copy link
Member

Apple authentication is necessary for UET to be able to download Xcode automatically and set it up. Unfortunately Apple two-factor doesn't work with TOTP codes; it only does 2FA over SMS and you can't turn 2FA off on Apple accounts.

There's basically two responses we can get from xcodes if it's going through authentication:

  • Apple ID: Missing username or a password. Please try again.: I think this happens if there's another authentication in progress (i.e. another machine or build job) for the same account. In this case, we need to just delay a random amount and try again.
  • Enter the 6 digit code sent to +xx •••• ••• •xx: We need to pull the latest SMS message from Plivo and pass it into standard input.

The idea is you'd then set e.g. UET_PLIVO_PHONE_NUMBER and UET_PLIVO_API_KEY or something like that in addition to XCODES_USERNAME and XCODES_PASSWORD, and UET will do the hard work of pulling the SMS messages and going through Apple two-factor in an entirely non-interactive manner.

@hach-que hach-que added migrated from gitlab Migrated from GitLab back burner No ETA on resolution labels Oct 31, 2024
@hach-que
Copy link
Member Author

Due to the way .NET reads standard output from child processes on macOS, it's not possible to respond to the prompts that xcodes issues. The only way to move forward with this feature would be to re-implement xcodes entirely in C#, or have them add support for XCODES_GET_2FA_SMS_COMMAND as outlined here: XcodesOrg/xcodes#311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back burner No ETA on resolution migrated from gitlab Migrated from GitLab
Projects
None yet
Development

No branches or pull requests

1 participant