Skip to content

Commit 667550b

Browse files
committed
fix login with 2fa
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 #326
1 parent 8a23d6f commit 667550b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/appstore/appstore_login.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ func (t *appstore) login(email, password, authCode, guid string) (Account, error
6868
var res http.Result[loginResult]
6969

7070
for attempt := 1; retry && attempt <= 4; attempt++ {
71-
ac := authCode
72-
if attempt == 1 {
73-
ac = ""
74-
}
75-
request := t.loginRequest(email, password, ac, guid, attempt)
71+
request := t.loginRequest(email, password, authCode, guid, attempt)
7672
request.URL, redirect = util.IfEmpty(redirect, request.URL), ""
7773
res, err = t.loginClient.Send(request)
7874
if err != nil {

0 commit comments

Comments
 (0)