From 27afd95229185df5578aa8f04d11b886b36aeefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=98=EB=88=84?= Date: Wed, 22 Mar 2023 14:17:06 +0000 Subject: [PATCH] fix: QueryParams model --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index ce1bcc9..4fe3d1c 100644 --- a/app.py +++ b/app.py @@ -65,14 +65,14 @@ async def link(): @app.get('/callback/steam') async def setup(request: Request, response: Response): - valid = await validate(request.query_params) + valid = await validate(dict(request.query_params)) if not valid: raise HTTPException(status_code=404, detail="We can't verify that you have Steam profile.") url = client.get_oauth_url() response.set_cookie(key="steam_id", value=encrypt(request.query_params.get("openid.claimed_id")), max_age=300) return RedirectResponse(url=url) -async def validate(data: dict): +async def validate(data: dict) -> bool: base = "https://steamcommunity.com/openid/login" params = { "openid.assoc_handle": data["openid.assoc_handle"],