Repository navigation
Fix Apple sign-in service-key retrieval and align auth with Fastlane - #188
Merged
Merged
Conversation
joshdholtz
marked this pull request as ready for review
October 6, 2026 18:00
JZDesign
approved these changes
Oct 6, 2026
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.
Checklist
go build ./...,go test ./..., andgofmtpassMotivation
rc setup applefails before authenticating because Apple's Olympus configuration endpoint returns 404. Fixes #185.Description
Fetch the current service key from
HEAD /logout, following Fastlane's replacement flow, so Apple setup and the read-only check can continue to sign-in. The request sends no session cookies and doesn't follow the signout redirect. Keep Olympus as a fallback and report both failures if neither source works.Also align sign-in headers with Fastlane, reject invalid SRP server public values, and report Apple SMS and verification errors even when the HTTP response is 200. Failed verification stops before trusting or fetching the session.
This doesn't add saved sessions, cached service keys, or legacy four-digit verification.
Implementation and validation
client.rb,two_step_or_factor_client.rb, andfastlane-sirp.make checkpassed (formatting, vet, race tests, lint), as did native and Windows builds.widgetKey. Full account login and 2FA haven't been tested live.Reference: fastlane/fastlane#30206
Note
High Risk
Changes Apple authentication flows (service key, SRP, sign-in/2FA error handling), which are security-critical and can block or misreport login if Apple’s behavior diverges.
Overview
Fixes Apple Connect sign-in when Olympus no longer returns a service key by fetching
widgetKeyfrom a cookielessHEAD /logoutredirect (Fastlane-style), with Olympus config as fallback and combined errors if both fail.Sign-in is tightened to match Fastlane:
Accept: application/json, text/javascripton SRP init/complete, invalid SRP server public values rejected, andappleAuthErrorMessagesurfaces AppleserviceErrors/ validation failures even on HTTP 200 (including SMS and bad verification codes, stopping before session trust).Adds broad httptest coverage plus a fastlane-sirp proof fixture for SRP alignment.
Reviewed by Cursor Bugbot for commit 14aea8a. Bugbot is set up for automated code reviews on this repo. Configure here.