Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

fix(api): load AUTH_SECRET from validated core.auth source

dextmorgnc9d594a8e7bf
diff --git a/flowsint-api/app/api/deps.py b/flowsint-api/app/api/deps.py
index feafcf0c..98804d37 100644
--- a/flowsint-api/app/api/deps.py
+++ b/flowsint-api/app/api/deps.py
@@ -2,19 +2,11 @@ from fastapi import Depends, HTTPException, status, Request
from fastapi.security import OAuth2PasswordBearer
from jose import JWTError, jwt
from sqlalchemy.orm import Session
-from flowsint_core.core.auth import ALGORITHM
+from flowsint_core.core.auth import ALGORITHM, AUTH_SECRET
from flowsint_core.core.postgre_db import get_db
from flowsint_core.core.models import Profile
from typing import Optional
-import os
-from dotenv import load_dotenv
-
-# Remplace avec ton URL de BDD
-AUTH_SECRET = os.getenv("AUTH_SECRET")
-
-load_dotenv()
-
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")