change access token duration

This commit is contained in:
jain
2023-07-14 12:45:08 +05:30
parent d3b7b6cd07
commit b3f35d271b
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class JuniorSerializer(serializers.ModelSerializer):
def get_user_type(self, obj):
email_verified = UserEmailOtp.objects.filter(email=obj.auth.username).last()
if email_verified and email_verified.user_type != None:
if email_verified and email_verified.user_type is not None:
return email_verified.user_type
return '1'

View File

@ -97,7 +97,7 @@ REST_FRAMEWORK = {
'PAGE_SIZE': 5,
}
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=50),
'ACCESS_TOKEN_LIFETIME': timedelta(hours=23, minutes=59, seconds=59, microseconds=999999),
'REFRESH_TOKEN_LIFETIME': timedelta(days=7),
}
# Database