KundaPanda / strawberry-django-jwt

[UNMAINTAINED] JSON Web Token (JWT) authentication for Django with Strawberry GraphQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Int cannot represent non-integer value

jaydensmith opened this issue · comments

.timestamp() returns POSIX timestamp as a float, so this causes an error because refresh_expires_in expects an int.

token_object.refresh_expires_in = (
refresh_token.created.timestamp() + jwt_settings.JWT_REFRESH_EXPIRATION_DELTA.total_seconds() - int(datetime.now().timestamp())
)