Skip to content

Commit

Permalink
Merge pull request #192 from docker/fix-login-issue
Browse files Browse the repository at this point in the history
Fix Login issue #191
  • Loading branch information
glours authored Nov 18, 2021
2 parents a86e5a9 + 6b376a1 commit c9cb0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/hub/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (c *Client) Login(username string, password string, twoFactorCodeProvider f
body := bytes.NewBuffer(data)

// Login on the Docker Hub
req, err := http.NewRequest("POST", c.domain+LoginURL, ioutil.NopCloser(body))
req, err := http.NewRequest("POST", c.domain+LoginURL, body)
if err != nil {
return "", "", err
}
Expand Down Expand Up @@ -270,7 +270,7 @@ func (c *Client) getTwoFactorToken(token string, twoFactorCodeProvider func() (s
body := bytes.NewBuffer(data)

// Request 2FA on the Docker Hub
req, err := http.NewRequest("POST", c.domain+TwoFactorLoginURL, ioutil.NopCloser(body))
req, err := http.NewRequest("POST", c.domain+TwoFactorLoginURL, body)
if err != nil {
return "", "", err
}
Expand Down

0 comments on commit c9cb0ac

Please sign in to comment.