fix: openid gives me url
This commit is contained in:
parent
bd9112e942
commit
659ec7458f
1 changed files with 2 additions and 1 deletions
3
app.py
3
app.py
|
@ -75,7 +75,8 @@ async def setup(request: Request):
|
||||||
raise HTTPException(status_code=404, detail="We can't verify that you have Steam profile.")
|
raise HTTPException(status_code=404, detail="We can't verify that you have Steam profile.")
|
||||||
url = client.get_oauth_url()
|
url = client.get_oauth_url()
|
||||||
response = RedirectResponse(url=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()
|
token = token.decode()
|
||||||
response.set_cookie(key="steam_id", value=token, max_age=1800)
|
response.set_cookie(key="steam_id", value=token, max_age=1800)
|
||||||
return response
|
return response
|
||||||
|
|
Reference in a new issue