This commit is contained in:
Keith Stevens
2023-01-25 18:12:44 +09:00
parent 5b7c32ebec
commit 76ef08dfe4
+2 -1
View File
@@ -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: