Fixed JWT token lifetime

This commit is contained in:
Keannu Bernasol 2023-08-02 15:48:45 +08:00
parent 1beaf909f0
commit 194e33db61
2 changed files with 25 additions and 3 deletions

View file

@ -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),

View file

@ -0,0 +1,20 @@
# Generated by Django 4.2.3 on 2023-07-28 16:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('courses', '0001_initial'),
('year_levels', '0001_initial'),
('semesters', '0001_initial'),
('subjects', '0002_alter_subject_code'),
]
operations = [
migrations.AlterUniqueTogether(
name='subject',
unique_together={('name', 'course', 'year_level', 'semester')},
),
]