Skip to content

Unsupported type for timedelta seconds component #553

@toniengelhardt

Description

@toniengelhardt

I'm getting the following error when updating to version 5.1.0. Version 5.0.0 works without problems:

TypeError: unsupported type for timedelta seconds component: datetime.timedelta

Screen Shot 2022-04-05 at 23 10 36

Settings:

SIMPLE_JWT = {
    'SIGNING_KEY': SECRET_KEY,
    'ACCESS_TOKEN_LIFETIME': timedelta(minutes=30),
    'REFRESH_TOKEN_LIFETIME': timedelta(days=15),
    'LEEWAY': timedelta(minutes=2),
    'AUTH_HEADER_TYPES': ('JWT',),
    'USER_ID_FIELD': 'id',
    'USER_ID_CLAIM': 'user_id',
    'ROTATE_REFRESH_TOKENS': True, # Rotate the tokens to allow infinite refresh lifetime.
    'BLACKLIST_AFTER_ROTATION': True, # Invalidate refresh token when it is used and rotated.
}

Not using a seconds unit anywhere...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions