Skip to content

Commit

Permalink
Fifth attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed May 30, 2024
1 parent fb7a878 commit eb0221d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/server/appleaccount.d
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ package class AppleAccount {
} else {
sendCode = () {
// urls["trustedDeviceSecondaryAuth"] to select the right phone number.
auto res = request.put("https://gsa.apple.com/auth/verify/phone/", `{"phoneNumber": {"id": 1}, "mode": "sms"}`);
auto res = request.put(urls["secondaryAuth"]);
// auto res = request.put("https://gsa.apple.com/auth/verify/phone/", `{"phoneNumber": {"id": 1}, "mode": "sms"}`);
log.infoF!"Code sent: %s"(res.responseBody().data!string());
return res.code == 200;
};
Expand All @@ -173,7 +174,7 @@ package class AppleAccount {
};
} else if (urlBagKey == "secondaryAuth") {
submitCode = (string code) {
auto result = request.post(urls["validateCode"], [ "securityCode": code ]);
auto result = request.post("https://gsa.apple.com/auth/verify/phone/securitycode", [ "securityCode": code ]);
auto resultCode = result.code();
log.traceF!"SMS 2FA response: %s"(resultCode);

Expand Down

0 comments on commit eb0221d

Please sign in to comment.