Skip to content

Commit

Permalink
fix cookie_data.items() error
Browse files Browse the repository at this point in the history
Signed-off-by: Vallari <[email protected]>
  • Loading branch information
VallariAg committed Aug 16, 2023
1 parent 6d80019 commit 0f81f14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ async def handle_callback(code: str, request: Request):
"access_token": token,
}
request.session["user"] = data
cookie = "; ".join([f'{str(key)}={str(value)}' for key, value in {"username": data["username"]}])
cookie_data = { "username": data["username"] }
cookie = "; ".join([f'{str(key)}={str(value)}' for key, value in cookie_data.items()])
response = RedirectResponse(PULPITO_URL)
response.set_cookie(key="GH_USER", value=cookie)
return response

0 comments on commit 0f81f14

Please sign in to comment.