Skip to content

Commit

Permalink
Fix issue #395 (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurttsam committed Aug 14, 2023
1 parent 784c2aa commit 969924a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Release type: patch

This release fixes the way we set the refresh token's field `revoked`.
Previously we were passing a naive DateTime object but now we pass the timestamp with the timezone info.

fixes #395
2 changes: 1 addition & 1 deletion gqlauth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def is_expired_(self) -> bool:
return datetime.now(tz=self.created.tzinfo) > self.expires_at_() or bool(self.revoked)

def revoke(self):
self.revoked = datetime.now()
self.revoked = timezone.now()
self.save(update_fields=["revoked"])

objects = RefreshTokenQuerySet.as_manager() # type: ignore
Expand Down

0 comments on commit 969924a

Please sign in to comment.