mas-cli / mas-cli/mas

`signin`: 2FA support

Open
#163 0 comments 4 reactions 0 assignees View on GitHub

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

  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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.