From 76ef08dfe481016d886c8eb723902f713ab96633 Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Wed, 25 Jan 2023 18:12:44 +0900 Subject: [PATCH] decoding --- backend/oasst_backend/api/v1/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/oasst_backend/api/v1/auth.py b/backend/oasst_backend/api/v1/auth.py index a2386362..9aa46150 100644 --- a/backend/oasst_backend/api/v1/auth.py +++ b/backend/oasst_backend/api/v1/auth.py @@ -25,7 +25,8 @@ async def get_current_user(token: str = Depends(oauth2_scheme)): detail="Could not validate credentials", headers={"WWW-Authenticate": "Bearer"}, ) - payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) + print(token) + payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM], options={"verify_signature": False}) print(payload) sub: str = payload.get("sub") if sub is None: