From 85396769cc8481d1484da369f9c1a2e0c59409f7 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 7 Mar 2021 00:44:19 +0300 Subject: Corrects Domain On Token Cookie Correctly formats the domain set on the cookie used for tokens. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- backend/routes/auth/authorize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/routes/auth/authorize.py') diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py index ce7b8bd..6a27c65 100644 --- a/backend/routes/auth/authorize.py +++ b/backend/routes/auth/authorize.py @@ -77,7 +77,8 @@ async def set_response_token( expiry: int ) -> None: """Helper that handles logic for updating a token in a set-cookie response.""" - stripped_domain = request_url.scheme + request_url.netloc + stripped_domain = f"{request_url.scheme}://{request_url.netloc}/" + if origin_url == constants.PRODUCTION_URL: domain = stripped_domain samesite = "strict" -- cgit v1.2.3