Skip to content

Commit

Permalink
Update server.py (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
hayescode authored Jan 10, 2024
1 parent ff4cec9 commit 38528dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/chainlit/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ async def oauth_login(provider_id: str, request: Request):
url=f"{provider.authorize_url}?{params}",
)
samesite = os.environ.get("CHAINLIT_COOKIE_SAMESITE", "lax") # type: Any
secure = samesite.lower() == 'none'
response.set_cookie(
"oauth_state", random, httponly=True, samesite=samesite, max_age=3 * 60
"oauth_state", random, httponly=True, samesite=samesite, secure=secure, max_age=3 * 60
)
return response

Expand Down

0 comments on commit 38528dc

Please sign in to comment.