Skip to content

Commit 5571885

Browse files
updated
1 parent 1f66f8c commit 5571885

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

todo_api/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
https://docs.djangoproject.com/en/4.0/ref/settings/
1111
"""
1212

13+
from datetime import timedelta
1314
from pathlib import Path
1415

1516
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -35,7 +36,8 @@
3536
}
3637

3738
SIMPLE_JWT = {
38-
# It will work instead of the default serializer(TokenObtainPairSerializer).
39+
# It will work instead of the default serializer(TokenObtainPairSerializer).\
40+
"ACCESS_TOKEN_LIFETIME": timedelta(hours=1),
3941
"TOKEN_OBTAIN_SERIALIZER": "rest_framework_simplejwt.serializers.MyTokenObtainPairSerializer",
4042
# ...
4143
}

0 commit comments

Comments
 (0)