Fix token refresh (#830)
The bug reported via #825 leeds to the conclusion that this could fix the issue. This needs to be tested with proper credentials, as I don’t have any!
This commit is contained in:
parent
f793a46007
commit
ad1ce28eae
1 changed files with 1 additions and 2 deletions
|
|
@ -253,8 +253,7 @@ func (v *Nissan) refreshToken() error {
|
|||
uri += "?" + data.Encode()
|
||||
req, err := request.New(http.MethodPost, uri, nil, request.URLEncoding)
|
||||
if err == nil {
|
||||
var tokens oidc.Token
|
||||
if err = v.DoJSON(req, &tokens); err == nil && v.tokens.AccessToken == "" {
|
||||
if err = v.DoJSON(req, &v.tokens); err == nil && v.tokens.AccessToken == "" {
|
||||
err = errors.New("missing access token")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue