diff --git a/api/routes/security.py b/api/routes/security.py index 88513dd..eb45453 100644 --- a/api/routes/security.py +++ b/api/routes/security.py @@ -310,10 +310,10 @@ async def redirect_callback(code: str, state: Optional[str] = None): # Set a cookie for the API domain response.set_cookie(**details, domain=domain) - if "localhost" in redirect_domain: - # Set a cookie for the localhost redirect. - # We may want to limit this to the development environment in the future. - response.set_cookie(**details, domain=redirect_domain) + # 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(**details, domain="localhost") return response diff --git a/pyproject.toml b/pyproject.toml index 63565a3..e2df22a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1.0" description = "" authors = ["Cannon Lock "] readme = "README.md" +package-mode = false [tool.poetry.dependencies] python = "^3.11"