working auth + users systems
This commit is contained in:
21
backend/core/config.py
Normal file
21
backend/core/config.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# core/config.py
|
||||
from pydantic_settings import BaseSettings
|
||||
from os import getenv
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv() # Load .env file
|
||||
|
||||
class Settings(BaseSettings):
|
||||
DB_URL: str = "postgresql://maia:maia@localhost:5432/maia"
|
||||
|
||||
REDIS_HOST: str = "localhost"
|
||||
REDIS_PORT: int = 6379
|
||||
|
||||
JWT_ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
|
||||
PEPPER: str = getenv("PEPPER", "")
|
||||
JWT_SECRET_KEY: str = getenv("JWT_SECRET_KEY", "")
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user