1
0

fix: openid gives me url

This commit is contained in:
オスカー、 2023-03-22 14:57:39 +00:00 committed by GitHub
parent bd9112e942
commit 659ec7458f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
app.py
View File

@ -75,7 +75,8 @@ async def setup(request: Request):
raise HTTPException(status_code=404, detail="We can't verify that you have Steam profile.")
url = client.get_oauth_url()
response = RedirectResponse(url=url)
token = encrypt(request.query_params.get("openid.claimed_id"))
openid = request.query_params.get("openid.claimed_id").split("/")[-1]
token = encrypt(openid)
token = token.decode()
response.set_cookie(key="steam_id", value=token, max_age=1800)
return response