diff --git a/config.py b/config.py index 10e3097..26c2986 100644 --- a/config.py +++ b/config.py @@ -15,8 +15,8 @@ DATABASE_CONFIG = { JWT_CONFIG = { 'secret_key': os.getenv('JWT_SECRET_KEY', 'your-secret-key'), 'algorithm': 'HS256', - 'access_token_expire': timedelta(minutes=int(os.getenv('JWT_ACCESS_EXPIRE_MINUTES', '30'))), - 'refresh_token_expire': timedelta(days=int(os.getenv('JWT_REFRESH_EXPIRE_DAYS', '7'))) + 'access_token_expire': timedelta(minutes=int(os.getenv('JWT_ACCESS_EXPIRE_MINUTES', '10'))), + 'refresh_token_expire': timedelta(days=int(os.getenv('JWT_REFRESH_EXPIRE_DAYS', '3'))) } # 日志配置 diff --git a/requirements.txt b/requirements.txt index f333860..acec49f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ fastapi>=0.95.2 +python-dotenv>=1.0.0 sqlalchemy>=2.0.15 passlib>=1.7.4 bcrypt>=4.0.1