`signin`: 2FA support
Open
Nobody has claimed this yet.
backlog
feature
investigation
- Dominant language
- Swift
- Stars
- 12.4k
- Forks
- 299
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
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
- Use
signincommand with only a user argument - mas asks for a password
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the signin command and reproduce the failure with an Apple ID that has 2FA enabled. Trace the current sign-in error path, then verify that the command waits for 2FA completion, supports cancellation with CTRL+C, and handles a timeout as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100