Bluelink: fix login (#7298)

Changed like in Bluelinky and tested locally: a6717a4fc8
This commit is contained in:
Michael Panzer 2023-04-08 21:52:25 +02:00 • committed by GitHub
parent 694c5944d3
commit debc533df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,23 +201,17 @@ func (v *Identity) brandLogin(cookieClient *request.Helper, user, password strin
}
}
var userId string
if err == nil {
resp, err = cookieClient.Get(resp.Header.Get("Location"))
if err == nil {
defer resp.Body.Close()
userId = resp.Request.URL.Query().Get("intUserId")
if len(userId) == 0 {
err = errors.New("usedId not found")
}
}
}
var code string
if err == nil {
data := map[string]string{
"intUserId": userId,
"intUserId": "",
}
req, err = request.New(http.MethodPost, v.config.URI+SilentSigninURL, request.MarshalJSON(data), request.JSONEncoding)