Skip to content

Commit

Permalink
Try adjusting cookie provision again
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Oct 19, 2024
1 parent 1522714 commit a799be7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions api/routes/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,21 +305,21 @@ async def redirect_callback(code: str, state: Optional[str] = None):

# Set the same cookie for localhost if we're doing a redirect to another domain (this is likely a dev mode request)
# We may want to restrict this to development environments in the future...
if redirect_domain not in [domain, ""]:
response.set_cookie(
access_token_key,
f"Bearer {access_token}",
domain="localhost",
httponly=True,
samesite="lax",
)
else:
response.set_cookie(
access_token_key,
f"Bearer {access_token}",
httponly=True,
samesite="lax",
)
# if redirect_domain not in [domain, ""]:
# response.set_cookie(
# access_token_key,
# f"Bearer {access_token}",
# domain="localhost",
# httponly=True,
# samesite="lax",
# )
# else:
response.set_cookie(
access_token_key,
f"Bearer {access_token}",
httponly=True,
samesite="lax",
)

return response

Expand Down

0 comments on commit a799be7

Please sign in to comment.