mirror of
https://github.com/majd/ipatool
synced 2026-11-26 17:27:52 +08:00
Fix initial authentication attempt with 2FA (#331)
I though that the first attempt would not contain the 2fa code, but I was wrong. This fixes the authentication when using 2fa enabled accounts. closes majd/ipatool#326 Co-authored-by: Majd Alfhaily <majd@alfhaily.me>
This commit is contained in:
1 parent
f3c9076ff0
commit
21cbd596bc
1 file changed
+1
-6
@@ -73,12 +73,7 @@ func (t *appstore) login(email, password, authCode, guid string) (Account, error
|
||||
retry := true
|
||||
|
||||
for attempt := 1; retry && attempt <= 4; attempt++ {
|
||||
ac := authCode
|
||||
if attempt == 1 {
|
||||
ac = ""
|
||||
}
|
||||
|
||||
request := t.loginRequest(email, password, ac, guid, attempt)
|
||||
request := t.loginRequest(email, password, authCode, guid, attempt)
|
||||
request.URL, _ = util.IfEmpty(redirect, request.URL), ""
|
||||
res, err = t.loginClient.Send(request)
|
||||
|
||||
|
||||
Reference in new issue
Block a user