Spaces:
Sleeping
Sleeping
SyedAzlanzar
commited on
Commit
·
c4b3444
1
Parent(s):
8baa93b
@debug : auth error 1.0
Browse files- app/auth/auth.py +2 -0
app/auth/auth.py
CHANGED
@@ -7,7 +7,9 @@ security = HTTPBearer()
|
|
7 |
def verify_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
8 |
JWT_SECRET = os.getenv("JWT_SECRET_KEY", "fallback_secret")
|
9 |
ALGORITHM = os.getenv("ALGORITHM")
|
|
|
10 |
token = credentials.credentials
|
|
|
11 |
try:
|
12 |
payload = jwt.decode(token, JWT_SECRET, algorithms=[ALGORITHM])
|
13 |
return payload
|
|
|
7 |
def verify_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
8 |
JWT_SECRET = os.getenv("JWT_SECRET_KEY", "fallback_secret")
|
9 |
ALGORITHM = os.getenv("ALGORITHM")
|
10 |
+
print(JWT_SECRET, ALGORITHM)
|
11 |
token = credentials.credentials
|
12 |
+
print(token)
|
13 |
try:
|
14 |
payload = jwt.decode(token, JWT_SECRET, algorithms=[ALGORITHM])
|
15 |
return payload
|