mas-cli/mas

`signin`: 2FA support

Opened this issue · 0 comments

mas does not currently support signing in using an Apple ID with 2FA enabled. Tested with mas 1.4.2 on macOS 10.11, the experience is as follows:

Steps

  1. Use signin command with only a user argument
  2. mas asks for a password
  3. Enter correct password

Result

  • mas immediately gives an error (below)
  • meanwhile the Apple 2FA dialog appears on another Mac and notification on iPhone of same user
$ mas signin 2fa-user@icloud.com
**==>** **Signing in to Apple ID: 2fa-user@icloud.com**
Password: 
~Error:~ Sign in failed: The operation couldn’t be completed. (mas.MASError error 0.)

Need to add support to wait for the 2FA process completes. Timeout? User should always be able to cancel with CTRL+C.