Skip to content

Fix login for accounts without 2FA - #455

Open
nab138 wants to merge 1 commit into
xtool-org:mainfrom
nab138:main
Open

nab138 wants to merge 1 commit into
xtool-org:mainfrom
nab138:main

Conversation

@nab138

@nab138 nab138 commented Nov 18, 2026 •

Copy link
Copy Markdown

What does this PR do?

Fixes login for free apple accounts with no 2FA method (i.e. burner accounts created on music.apple.com). For these accounts, GSA says "repair," since they want you to add a 2FA method, but you can just ignore it and proceed as normal.

How was it tested?

Ran locally on linux and logged in with my burner. I can test on macOS if needed.

AI tool usage

How much of the code in this PR was AI-assisted? (check one)

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI in writing code. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

Summary by CodeRabbit

  • Authentication
    • Added support for repair-mode authentication responses, allowing the sign-in flow to continue without entering the standard two-factor authentication steps for those responses.
    • Other two-factor authentication flows remain unchanged.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The authentication mode enum adds repair. When a 409 response uses this mode, authentication returns loginData, and the two-factor operation exits without sending an authentication request or validating a code.

Changes: Authentication flow

Layer / File(s) Summary
Repair-mode authentication handling
Sources/XKit/GrandSlam/Model/GrandSlamAuthEndpoint.swift, Sources/XKit/GrandSlam/Operations/GrandSlamAuthenticateOperation.swift, Sources/XKit/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift
The authentication mode enum adds repair. For this mode, the authentication operation returns loginData, and the two-factor operation returns without sending a request or validating a code.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: kabiroberai

Merge Risk: Minimal · up to 29954

This change lets free Apple accounts without 2FA continue logging in when the server asks them to repair the account. No concrete merge-blocking risk was found. The author tested on Linux only, so macOS behavior is unverified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: login for accounts without 2FA. The change adds a repair mode to GSA authentication. On status 409 with repair mode, authenticate returns loginData, and the two-factor…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: login for accounts without 2FA. The change adds a repair mode to GSA authentication. On status 409 with repair mode, authenticate returns loginData, and the two-factor operation returns without further authentication. This matches the PR objective of letting free Apple accounts without a 2FA method continue past the repair prompt. The title is specific and does not overstate the scope.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a7f1dfd-c584-4acc-bfe0-2a754651db3c
Commits

Reviewing files that changed from the base of the PR and between 5318ebc and 29954c9.

Files selected for processing: 3

  • Sources/XKit/GrandSlam/Model/GrandSlamAuthEndpoint.swift
  • Sources/XKit/GrandSlam/Operations/GrandSlamAuthenticateOperation.swift
  • Sources/XKit/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant