fix context; decoupling decode_token algo
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ def get_current_user_id(request: Request):
|
||||
raise HTTPException(status_code=401, detail="Not authenticated")
|
||||
|
||||
try:
|
||||
payload = decode_token(token, JWT_SECRET, algorithms=[JWT_ALGORITHM])
|
||||
payload = decode_token(token)
|
||||
return payload["sub"]
|
||||
except:
|
||||
raise HTTPException(status_code=401, detail="Invalid token")
|
||||
Reference in New Issue
Block a user