Spaces:
Sleeping
Sleeping
Update core/security.py
Browse files- core/security.py +3 -2
core/security.py
CHANGED
|
@@ -33,8 +33,9 @@ def create_access_token(data: dict, expires_delta: timedelta = None):
|
|
| 33 |
return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
|
| 34 |
|
| 35 |
# Get the current user from the JWT token
|
| 36 |
-
async def get_current_user(token: str = Depends(oauth2_scheme)):
|
| 37 |
-
print("
|
|
|
|
| 38 |
|
| 39 |
if not token:
|
| 40 |
print("❌ No token received")
|
|
|
|
| 33 |
return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
|
| 34 |
|
| 35 |
# Get the current user from the JWT token
|
| 36 |
+
async def get_current_user(request: Request, token: str = Depends(oauth2_scheme)):
|
| 37 |
+
print("🧪 Request headers:", dict(request.headers))
|
| 38 |
+
print("🔐 Raw token received:", token)
|
| 39 |
|
| 40 |
if not token:
|
| 41 |
print("❌ No token received")
|