Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions runzero/client/_http/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def is_expired(self) -> bool:

:returns: Returns a bool of whether the token is expired or about to
"""
delta = self.created_at - datetime.now()
return not delta.total_seconds() <= (self.expires_in + 60)
delta = datetime.now() - self.created_at
return delta.total_seconds() >= (self.expires_in - 60)


class BearerToken(AuthBase):
Expand Down
Loading