Skip to content

Commit

Permalink
Don't refresh with empty refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBishop committed May 15, 2024
1 parent 721e04f commit 47250df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/TWCManager/Vehicle/TeslaAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def setCarApiBearerToken(self, token=None):

def setCarApiRefreshToken(self, token):
self.carApiRefreshToken = token
if not self.master.tokenSyncEnabled() and (
if token and not self.master.tokenSyncEnabled() and (
self.getCarApiBearerToken() == ""
or self.getCarApiTokenExpireTime() - time.time() < 60 * 60
):
Expand Down

0 comments on commit 47250df

Please sign in to comment.