mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-29 00:35:45 +08:00
Fixed JWT token lifetime
This commit is contained in:
parent
1beaf909f0
commit
194e33db61
2 changed files with 25 additions and 3 deletions
|
@ -10,6 +10,7 @@ For the full list of settings and their values, see
|
|||
https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||
"""
|
||||
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv # Python dotenv
|
||||
import os
|
||||
|
@ -235,9 +236,10 @@ else:
|
|||
|
||||
SITE_NAME = 'Stud-E'
|
||||
|
||||
JWT_TOKEN_LIFETIME = 10800
|
||||
ACCESS_TOKEN_LIFETIME = JWT_TOKEN_LIFETIME
|
||||
REFRESH_TOKEN_LIFETIME = 24 * JWT_TOKEN_LIFETIME
|
||||
SIMPLE_JWT = {
|
||||
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=360),
|
||||
"REFRESH_TOKEN_LIFETIME": timedelta(minutes=360)
|
||||
}
|
||||
|
||||
LEAFLET_CONFIG = {
|
||||
'DEFAULT_CENTER': (8.48567, 124.65642),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue