Skip to content

Comments

Fix refresh token expiry check for naive datetime comparison#271

Merged
Mng-dev-ai merged 1 commit intomainfrom
fix-refresh-token
Feb 22, 2026
Merged

Fix refresh token expiry check for naive datetime comparison#271
Mng-dev-ai merged 1 commit intomainfrom
fix-refresh-token

Conversation

@Mng-dev-ai
Copy link
Owner

Summary

  • Fix RefreshToken.is_expired to handle naive (timezone-unaware) expires_at datetimes by assuming UTC before comparing with datetime.now(timezone.utc)
  • Prevents TypeError when the database returns a naive datetime

Test plan

  • Verify refresh token expiry works correctly with timezone-aware datetimes
  • Verify refresh token expiry works correctly with naive datetimes from the database

@Mng-dev-ai Mng-dev-ai merged commit 5097363 into main Feb 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant