aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-03-07 00:44:19 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-03-07 00:44:19 +0300
commit85396769cc8481d1484da369f9c1a2e0c59409f7 (patch)
treea2108b6b1ec75e5e791fa61382b68d44de17770a
parentCorrects Domain On Token Cookie (diff)
Corrects Domain On Token Cookie
Correctly formats the domain set on the cookie used for tokens. Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r--backend/routes/auth/authorize.py3
1 files changed, 2 insertions, 1 deletions
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"