Skip to content

Commit

Permalink
[spaceship] Fix Apple ID 2FA from locking Apple accounts (#21072)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdholtz committed Feb 23, 2023
1 parent b4263a2 commit af2f3e6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions spaceship/lib/spaceship/two_step_or_factor_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,17 @@ def handle_two_step_for_device(device_id)

# Send token to server to get a valid session
r = request(:post) do |req|
req.url("https://idmsa.apple.com/appleauth/auth/verify/device/#{device_id}/securitycode")
req.url("https://idmsa.apple.com/appleauth/auth/verify/phone/securitycode")
req.headers['Content-Type'] = 'application/json'
req.body = { "code" => code.to_s }.to_json
req.body = {
"phoneNumber": {
"id": device_id
},
"securityCode": {
"code" => code.to_s
},
"mode": "sms"
}.to_json
update_request_headers(req)
end

Expand Down

0 comments on commit af2f3e6

Please sign in to comment.