proofly / project /config.py
Pragthedon's picture
Increase default JWT access token expiration to 7 days
68d56ca
raw
history blame contribute delete
937 Bytes
import os
from dotenv import load_dotenv
load_dotenv()
# MongoDB
MONGO_URI = os.getenv("MONGO_URI", "mongodb://localhost:27017/")
MONGO_DB_NAME = os.getenv("MONGO_DB_NAME", "factcheck")
# FAISS (still stored on disk)
FAISS_FILE = os.getenv("FAISS_FILE", "faiss.index")
# API Keys
NEWS_API_KEY = os.getenv("NEWS_API_KEY")
# User Agent
USER_AGENT = os.getenv("USER_AGENT", "ProoflyBot/1.0")
# Models
SENTENCE_TRANSFORMER_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
NLI_MODEL = "facebook/bart-large-mnli"
# JWT
JWT_SECRET_KEY = os.getenv("JWT_SECRET_KEY", "change-this-jwt-secret")
JWT_ACCESS_TOKEN_MINS = int(os.getenv("JWT_ACCESS_TOKEN_MINS", "10080"))
JWT_REFRESH_TOKEN_DAYS= int(os.getenv("JWT_REFRESH_TOKEN_DAYS", "7"))
# Password pepper — mixed into password before bcrypt so a leaked DB alone
# cannot crack passwords without also knowing this server secret.
BCRYPT_PEPPER = os.getenv("BCRYPT_PEPPER", "")