From 831b08eabd1f5679a061114935866eae554fd9ad Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Sat, 24 Oct 2026 15:16:40 +0530 Subject: [PATCH] fix(middleware): exempt /api/auth/login/ from org context requirement --- backend/common/middleware/get_company.py | 1 + backend/common/middleware/rls_context.py | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/common/middleware/get_company.py b/backend/common/middleware/get_company.py index d502c989..2b9b9cf4 100644 --- a/backend/common/middleware/get_company.py +++ b/backend/common/middleware/get_company.py @@ -58,6 +58,7 @@ class GetProfileAndOrg: def process_request(self, request): # Skip JWT validation for authentication endpoints that don't need org context auth_skip_paths = [ + "/api/auth/login/", "/api/auth/google/", "/api/auth/refresh-token/", "/api/auth/me/", diff --git a/backend/common/middleware/rls_context.py b/backend/common/middleware/rls_context.py index 80c9dffe..752b449f 100644 --- a/backend/common/middleware/rls_context.py +++ b/backend/common/middleware/rls_context.py @@ -45,6 +45,7 @@ class RequireOrgContext: # Paths that don't require org context EXEMPT_PATHS = [ + "/api/auth/login/", "/api/auth/refresh-token/", "/api/auth/me/", "/api/auth/switch-org/",