fix: fall back to legacy Store authentication - #514
Merged
Conversation
Owner
Author
|
@Horskin Can you fix the linting issues so we can get this merged? |
Contributor
|
Idk why, but whether I use an ID with or without 2FA, I still can't log in. When I tried with an ID (no 2FA), it still asked me for a 2FA code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the App Store login flow by adding robust handling for legacy authentication fallbacks and better error reporting when Apple returns unexpected responses. It introduces a new error type to capture non-XML or empty responses, ensures the correct request payload is preserved during redirects, and updates tests to cover these scenarios.
App Store login improvements:
appstore_login.goto retry login with the legacy authentication endpoint (legacyAuthenticateEndpoint) when the native endpoint returns specific HTTP errors or empty responses. [1] [2] [3]attemptvalue are preserved. [1] [2]Error handling enhancements:
UnexpectedResponseErrortype inclient.goto capture HTTP status and response snippets when Apple returns an empty or non-plist body.Test coverage:
appstore_login_test.goandclient_test.goto verify fallback to legacy authentication, correct handling of redirects, and preservation of request bodies and headers. [1] [2] [3]