From 29e958356cd68e03ac138c2b7f4aefa433ad18fc Mon Sep 17 00:00:00 2001 From: Dadoum Date: Fri, 21 Jun 2024 08:33:56 +0200 Subject: [PATCH] Implement bitxeno's http request (#51) --- source/server/appleaccount.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/server/appleaccount.d b/source/server/appleaccount.d index 1f056e6..4059838 100644 --- a/source/server/appleaccount.d +++ b/source/server/appleaccount.d @@ -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);