From b44f8c91087aad48a12a78c8ab80936cf8dd43b9 Mon Sep 17 00:00:00 2001 From: "raoha.rh" Date: Mon, 3 Jun 2024 13:42:01 +0800 Subject: [PATCH] fix: user token cookies key --- server/routers/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routers/auth.py b/server/routers/auth.py index f70fba5e..9a60124a 100644 --- a/server/routers/auth.py +++ b/server/routers/auth.py @@ -80,7 +80,7 @@ async def callback(request: Request, response: Response): async def userinfo(request: Request, response: Response, petercat_user_token: str = Cookie(None)): if not petercat_user_token: return await getAnonymousUser(request, response) - data = await getAnonymousUserInfoByToken(petercat_user_token) if petercat_user_token.startswith("client|") else await getUserInfoByToken(user_token) + data = await getAnonymousUserInfoByToken(petercat_user_token) if petercat_user_token.startswith("client|") else await getUserInfoByToken(petercat_user_token) if data is None: raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Failed to get access token") if data :