Skip to content

Commit

Permalink
Implement bitxeno's http request (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Jun 21, 2024
1 parent 3243bd1 commit 29e9583
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/server/appleaccount.d
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ package class AppleAccount {
};
} else if (urlBagKey == "secondaryAuth") {
submitCode = (string code) {
auto result = request.post("https://gsa.apple.com/auth/verify/phone/securitycode", [ "securityCode": code ]);
auto result = request.post("https://gsa.apple.com/auth/verify/phone/securitycode",
format!`{"securityCode": {"code": "%s"}, "phoneNumber": {"id": 1}, "mode": "sms"}`(code),
"application/json"
);
auto resultCode = result.code();
log.traceF!"SMS 2FA response: %s"(resultCode);

Expand Down

0 comments on commit 29e9583

Please sign in to comment.