diff --git a/src/routes/login.py b/src/routes/login.py index 80833c9..6981171 100644 --- a/src/routes/login.py +++ b/src/routes/login.py @@ -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