Skip to content

Commit

Permalink
Mercedes: fix refresh token handling (#18893)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneNulschDE authored Feb 18, 2025
1 parent 70dca20 commit 22db4e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vehicle/mercedes/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func (v *Identity) RefreshToken(token *oauth2.Token) (*oauth2.Token, error) {
return nil, err
}

if res.RefreshToken == "" {
res.RefreshToken = token.RefreshToken
}

tok := util.TokenWithExpiry(&res)
v.TokenSource = oauth.RefreshTokenSource(tok, v)

Expand Down

0 comments on commit 22db4e1

Please sign in to comment.