Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devex): upgrade social-auth-app-django, social-auth-core, pyjwt (#57783)

Julian Bez0a3b74898c0e
diff --git a/ee/api/authentication.py b/ee/api/authentication.py
index fee2ddc13f85..b1107573d865 100644
--- a/ee/api/authentication.py
+++ b/ee/api/authentication.py
@@ -188,7 +188,7 @@ class MultitenantSAMLAuth(SAMLAuth):
return output or ""
- def get_user_details(self, response):
+ def get_user_details(self, response) -> dict[str, str | None]:
"""
Overridden to find attributes across multiple possible names.
"""
@@ -287,14 +287,14 @@ class MultitenantSAMLAuth(SAMLAuth):
class CustomGoogleOAuth2(GoogleOAuth2):
def auth_extra_arguments(self):
extra_args = super().auth_extra_arguments()
- is_reauth = self.strategy.request.GET.get("reauth") == "true"
+ is_reauth = self.strategy.request_get().get("reauth") == "true"
if not is_reauth:
prompt_tokens = [token for token in str(extra_args.get("prompt", "")).split() if token]
if "select_account" not in prompt_tokens:
prompt_tokens.append("select_account")
extra_args["prompt"] = " ".join(prompt_tokens)
- email = self.strategy.request.GET.get("email")
+ email = self.strategy.request_get().get("email")
if email:
extra_args["login_hint"] = email
@@ -577,13 +577,15 @@ class BillingServiceAuthentication(authentication.BaseAuthentication):
logger.exception("Billing service auth failed: invalid license key format")
raise AuthenticationFailed("Invalid license key format")
- return jwt.decode(
+ decoded_payload = jwt.decode(
token,
license_secret,
algorithms=["HS256"],
audience=self.EXPECTED_AUDIENCE,
)
+ return cast(BillingServiceJWTPayload, decoded_payload)
+
def social_auth_allowed(backend, details, response, *args, **kwargs) -> None:
email = details.get("email")
diff --git a/ee/api/test/test_authentication.py b/ee/api/test/test_authentication.py
index ce3e594232bf..fd95d78c0132 100644
--- a/ee/api/test/test_authentication.py
+++ b/ee/api/test/test_authentication.py
@@ -871,17 +871,15 @@ class TestCustomGoogleOAuth2(APILicensedTest):
self.details = {"email": "[email protected]"}
self.sub = "google-oauth2|123456789"
- def test_auth_extra_arguments_without_email(self):
- """Test that auth_extra_arguments returns base arguments when no email is provided."""
- # Mock strategy to return empty GET parameters
- mock_request = type("MockRequest", (), {})()
- mock_request.GET = {}
-
+ def _mock_strategy(self, get_params: dict[str, str]) -> object:
mock_strategy = type("MockStrategy", (), {})()
- mock_strategy.request = mock_request
+ mock_strategy.request_get = lambda: get_params
mock_strategy.setting = lambda name, default=None, backend=None: default
+ return mock_strategy
- self.google_oauth.strategy = mock_strategy
+ def test_auth_extra_arguments_without_email(self):
+ """Test that auth_extra_arguments returns base arguments when no email is provided."""
+ self.google_oauth.strategy = self._mock_strategy({}) # type: ignore[assignment] # ty: ignore[invalid-assignment]
extra_args = self.google_oauth.auth_extra_arguments()
@@ -891,15 +889,7 @@ class TestCustomGoogleOAuth2(APILicensedTest):
def test_auth_extra_arguments_with_email(self):
"""Test that auth_extra_arguments adds login_hint when email is provided."""
- # Mock strategy to return email in GET parameters
- mock_request = type("MockRequest", (), {})()
- mock_request.GET = {"email": "[email protected]"}
-
- mock_strategy = type("MockStrategy", (), {})()
- mock_strategy.request = mock_request
- mock_strategy.setting = lambda name, default=None, backend=None: default
-
- self.google_oauth.strategy = mock_strategy
+ self.google_oauth.strategy = self._mock_strategy({"email": "[email protected]"}) # type: ignore[assignment] # ty: ignore[invalid-assignment]
extra_args = self.google_oauth.auth_extra_arguments()
@@ -908,14 +898,7 @@ class TestCustomGoogleOAuth2(APILicensedTest):
def test_auth_extra_arguments_reauth_does_not_force_select_account(self):
"""Test that reauth flow does not force account picker prompt."""
- mock_request = type("MockRequest", (), {})()
- mock_request.GET = {"reauth": "true"}
-
- mock_strategy = type("MockStrategy", (), {})()
- mock_strategy.request = mock_request
- mock_strategy.setting = lambda name, default=None, backend=None: default
-
- self.google_oauth.strategy = mock_strategy
+ self.google_oauth.strategy = self._mock_strategy({"reauth": "true"}) # type: ignore[assignment] # ty: ignore[invalid-assignment]
extra_args = self.google_oauth.auth_extra_arguments()
@@ -923,14 +906,7 @@ class TestCustomGoogleOAuth2(APILicensedTest):
def test_auth_extra_arguments_preserves_existing_prompt(self):
"""Test that auth_extra_arguments appends select_account to existing prompt values."""
- mock_request = type("MockRequest", (), {})()
- mock_request.GET = {}
-
- mock_strategy = type("MockStrategy", (), {})()
- mock_strategy.request = mock_request
- mock_strategy.setting = lambda name, default=None, backend=None: default
-
- self.google_oauth.strategy = mock_strategy
+ self.google_oauth.strategy = self._mock_strategy({}) # type: ignore[assignment] # ty: ignore[invalid-assignment]
with patch("ee.api.authentication.GoogleOAuth2.auth_extra_arguments", return_value={"prompt": "consent"}):
extra_args = self.google_oauth.auth_extra_arguments()
diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr
index 9da1137b1ad0..fea4d59b3399 100644
--- a/posthog/api/test/__snapshots__/test_action.ambr
+++ b/posthog/api/test/__snapshots__/test_action.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestActionApi.test_listing_actions_is_not_nplus1.1
@@ -502,8 +502,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestActionApi.test_listing_actions_is_not_nplus1.18
@@ -1325,8 +1325,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestActionApi.test_listing_actions_is_not_nplus1.9
diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr
index ee465af94a19..c09af98b79c3 100644
--- a/posthog/api/test/__snapshots__/test_annotation.ambr
+++ b/posthog/api/test/__snapshots__/test_annotation.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.1
@@ -501,8 +501,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.18
@@ -1253,8 +1253,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.9
diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr
index 845add6f2e15..65bde2164bf9 100644
--- a/posthog/api/test/__snapshots__/test_element.ambr
+++ b/posthog/api/test/__snapshots__/test_element.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestElement.test_element_stats_postgres_queries_are_as_expected.1
diff --git a/posthog/api/test/__snapshots__/test_feature_flag.ambr b/posthog/api/test/__snapshots__/test_feature_flag.ambr
index 2c13e8eded51..3a8c1b99be22 100644
--- a/posthog/api/test/__snapshots__/test_feature_flag.ambr
+++ b/posthog/api/test/__snapshots__/test_feature_flag.ambr
@@ -1769,8 +1769,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestFeatureFlag.test_creating_static_cohort.1
diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr
index 0491d635296c..34d5dbfe8795 100644
--- a/posthog/api/test/__snapshots__/test_insight.ambr
+++ b/posthog/api/test/__snapshots__/test_insight.ambr
@@ -612,8 +612,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestInsight.test_listing_insights_does_not_nplus1.1
@@ -1606,8 +1606,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestInsight.test_listing_insights_does_not_nplus1.28
diff --git a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr
index bde76c33bf80..3b8492799b60 100644
--- a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr
+++ b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.1
@@ -3463,8 +3463,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.1
diff --git a/posthog/api/test/__snapshots__/test_plugin.ambr b/posthog/api/test/__snapshots__/test_plugin.ambr
index 0067eb01e207..211bc39e130f 100644
--- a/posthog/api/test/__snapshots__/test_plugin.ambr
+++ b/posthog/api/test/__snapshots__/test_plugin.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.1
@@ -363,8 +363,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.18
@@ -726,8 +726,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.27
@@ -1186,8 +1186,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.9
diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr
index 11ac4430f6ad..cec306521845 100644
--- a/posthog/api/test/__snapshots__/test_preflight.ambr
+++ b/posthog/api/test/__snapshots__/test_preflight.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPreflight.test_cloud_preflight_limited_db_queries.1
diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
index 72ec9acf4fe7..e4e6cf0231bb 100644
--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.1
@@ -1164,8 +1164,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.3
@@ -2975,8 +2975,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1
@@ -4097,8 +4097,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29
@@ -4987,8 +4987,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1
@@ -5578,8 +5578,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111
@@ -7102,8 +7102,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142
@@ -8626,8 +8626,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173
@@ -10540,8 +10540,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.200
@@ -11544,8 +11544,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41
@@ -13552,8 +13552,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8
@@ -15513,8 +15513,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_retrieve_dashboard.3
@@ -15900,8 +15900,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_retrieve_dashboard_list.1
@@ -16578,8 +16578,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_retrieve_dashboard_list.21
@@ -17550,8 +17550,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestDashboard.test_retrieve_dashboard_list.41
diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr
index a84f2411a00e..a63c718b0913 100644
--- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr
+++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr
@@ -38,8 +38,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestNotebooks.test_updates_notebook.1
@@ -1017,8 +1017,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestNotebooks.test_updates_notebook.27
@@ -1616,8 +1616,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestNotebooks.test_updates_notebook.9
diff --git a/posthog/api/test/test_authentication.py b/posthog/api/test/test_authentication.py
index 5c11fef9cba3..b05925e03979 100644
--- a/posthog/api/test/test_authentication.py
+++ b/posthog/api/test/test_authentication.py
@@ -1220,12 +1220,14 @@ class TestPasswordResetAPI(APIBaseTest):
UserSocialAuth.objects.create(
user=self.user,
provider="google-oauth2",
+ uid="google-oauth2|test",
extra_data='"{"expires": 3599, "auth_time": 1633412833, "token_type": "Bearer", "access_token": "ya29"}"',
)
UserSocialAuth.objects.create(
user=self.user,
provider="github",
+ uid="github|test",
extra_data='"{"expires": 3599, "auth_time": 1633412833, "token_type": "Bearer", "access_token": "ya29"}"',
)
diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recording_playlist.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recording_playlist.ambr
index 652ad9924b86..c25967db6894 100644
--- a/posthog/session_recordings/test/__snapshots__/test_session_recording_playlist.ambr
+++ b/posthog/session_recordings/test/__snapshots__/test_session_recording_playlist.ambr
@@ -330,8 +330,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordingPlaylist.test_filters_playlist_by_type.15
@@ -1016,8 +1016,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordingPlaylist.test_filters_playlist_by_type.30
@@ -1318,8 +1318,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordingPlaylist.test_filters_playlist_by_type.39
diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr
index c0f853e67add..bfe8c02c14a4 100644
--- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr
+++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr
@@ -46,8 +46,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_returns_newest_first.1
@@ -727,8 +727,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_scenarios_0_basic_listing.1
@@ -1404,8 +1404,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_scenarios_1_multiple_snapshots.1
@@ -2077,8 +2077,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_scenarios_2_many_distinct_ids.1
@@ -2750,8 +2750,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_sorted_0_descending_original_.1
@@ -3427,8 +3427,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_sorted_1_descending.1
@@ -4104,8 +4104,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_get_session_recordings_sorted_2_ascending.1
@@ -4781,8 +4781,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.1
@@ -5490,8 +5490,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.116
@@ -6147,8 +6147,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.130
@@ -6226,8 +6226,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.133
@@ -6952,8 +6952,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.15
@@ -7820,8 +7820,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.167
@@ -9095,8 +9095,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.31
@@ -9805,8 +9805,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.48
@@ -10583,8 +10583,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.65
@@ -11346,8 +11346,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.82
@@ -12078,8 +12078,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.99
diff --git a/products/early_access_features/backend/test/__snapshots__/test_early_access_feature.ambr b/products/early_access_features/backend/test/__snapshots__/test_early_access_feature.ambr
index 103e33b8240c..9b43244bdfc2 100644
--- a/products/early_access_features/backend/test/__snapshots__/test_early_access_feature.ambr
+++ b/products/early_access_features/backend/test/__snapshots__/test_early_access_feature.ambr
@@ -335,8 +335,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPreviewList.test_early_access_features.9
@@ -466,8 +466,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPreviewList.test_early_access_features_includes_payload_in_preview.5
@@ -831,8 +831,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPreviewList.test_early_access_features_with_cached_team.6
@@ -1002,8 +1002,8 @@
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
FROM "posthog_user"
- WHERE "posthog_user"."id" = 99999
- LIMIT 21
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
# name: TestPreviewList.test_early_access_features_with_pre_env_cached_team.5
diff --git a/pyproject.toml b/pyproject.toml
index 83efb99ae8c3..96136a96440e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -104,7 +104,7 @@ dependencies = [
"pyarrow==18.1.0",
"pydantic~=2.12.0",
"pyod==2.0.7",
- "pyjwt~=2.10.0",
+ "pyjwt~=2.12.1",
"pymssql==2.3.5",
"pymysql==1.1.1",
"pymongo==4.13.2",
@@ -124,8 +124,8 @@ dependencies = [
"simple-salesforce~=1.12.9",
"slack-sdk==3.39.0",
"snowflake-connector-python==4.3.0",
- "social-auth-app-django~=5.4.3",
- "social-auth-core~=4.8.3",
+ "social-auth-app-django~=5.8.0",
+ "social-auth-core~=4.8.7",
"django-scim2==0.19.0",
"sqlparse==0.5.4",
"sshtunnel==0.4.0",
diff --git a/uv.lock b/uv.lock
index c85b7ddecaa9..a9fbe1b85e9b 100644
--- a/uv.lock
+++ b/uv.lock
@@ -5502,7 +5502,7 @@ requires-dist = [
{ name = "pyarrow", specifier = "==18.1.0" },
{ name = "pydantic", specifier = "~=2.12.0" },
{ name = "pydantic-avro", specifier = "~=0.9.0" },
- { name = "pyjwt", specifier = "~=2.10.0" },
+ { name = "pyjwt", specifier = "~=2.12.1" },
{ name = "pymediainfo", specifier = "~=7.0.1" },
{ name = "pymongo", specifier = "==4.13.2" },
{ name = "pymssql", specifier = "==2.3.5" },
@@ -5525,8 +5525,8 @@ requires-dist = [
{ name = "simple-salesforce", specifier = "~=1.12.9" },
{ name = "slack-sdk", specifier = "==3.39.0" },
{ name = "snowflake-connector-python", specifier = "==4.3.0" },
- { name = "social-auth-app-django", specifier = "~=5.4.3" },
- { name = "social-auth-core", specifier = "~=4.8.3" },
+ { name = "social-auth-app-django", specifier = "~=5.8.0" },
+ { name = "social-auth-core", specifier = "~=4.8.7" },
{ name = "sqlparse", specifier = "==0.5.4" },
{ name = "sshtunnel", specifier = "==0.4.0" },
{ name = "statshog", specifier = "==1.0.6" },
@@ -6033,11 +6033,11 @@ wheels = [
[[package]]
name = "pyjwt"
-version = "2.10.1"
+version = "2.12.1"
source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz", hash = "sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953", size = 87785, upload-time = "2024-11-28T03:43:29.933Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/c2/27/a3b6e5bf6ff856d2509292e95c8f57f0df7017cf5394921fc4e4ef40308a/pyjwt-2.12.1.tar.gz", hash = "sha256:c74a7a2adf861c04d002db713dd85f84beb242228e671280bf709d765b03672b", size = 102564, upload-time = "2026-03-13T19:27:37.25Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/61/ad/689f02752eeec26aed679477e80e632ef1b682313be70793d798c1d5fc8f/PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb", size = 22997, upload-time = "2024-11-28T03:43:27.893Z" },
+ { url = "https://files.pythonhosted.org/packages/e5/7a/8dd906bd22e79e47397a61742927f6747fe93242ef86645ee9092e610244/pyjwt-2.12.1-py3-none-any.whl", hash = "sha256:28ca37c070cad8ba8cd9790cd940535d40274d22f80ab87f3ac6a713e6e8454c", size = 29726, upload-time = "2026-03-13T19:27:35.677Z" },
]
[package.optional-dependencies]
@@ -7155,20 +7155,20 @@ wheels = [
[[package]]
name = "social-auth-app-django"
-version = "5.4.3"
+version = "5.8.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "django" },
{ name = "social-auth-core" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/2a/07/bb2465e4116d4761b028bd07b99087009caa81c1511c886d74c4ccece3a2/social_auth_app_django-5.4.3.tar.gz", hash = "sha256:d1f4286d5ca1e512c9b2f686e7ecb2a0128148f1a33d853b69dc07b58508362e", size = 24860, upload-time = "2025-02-13T13:07:34.557Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/d7/89/bebc2fe61afa22f0da654fd2c3f671a4c84d08bdaae744ed16295f841e37/social_auth_app_django-5.8.0.tar.gz", hash = "sha256:512d4a0f28f29d961badad14ed9b7247e4b3f870ed8f261035735a7ac69f4455", size = 29409, upload-time = "2026-04-20T10:49:10.765Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/e0/cd/43a25dabdf7689109b01ac866848c984594769ec3cbc5ce4c261b4895237/social_auth_app_django-5.4.3-py3-none-any.whl", hash = "sha256:db70b972faeb10ee1ec83d0dc7dbd0558d5f5830417bba317b712b10ff58d031", size = 26241, upload-time = "2025-02-13T13:07:32.787Z" },
+ { url = "https://files.pythonhosted.org/packages/fb/09/5ac5ba20704b0c86e9d5547a0a91aaa3c8baadae43a02f5c1b265a778f46/social_auth_app_django-5.8.0-py3-none-any.whl", hash = "sha256:c4ecbbbb1fd42143aaa16e2b18a1d77d652939385bcc6a0ff53af3bacd65e5f4", size = 28480, upload-time = "2026-04-20T10:49:09.548Z" },
]
[[package]]
name = "social-auth-core"
-version = "4.8.3"
+version = "4.8.7"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "defusedxml" },
@@ -7178,9 +7178,9 @@ dependencies = [
{ name = "requests" },
{ name = "requests-oauthlib" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/87/7b/c5b40fca7a9bd052fb403a15f63f6de7c7daf65ff2ce463f5cdb7855ea25/social_auth_core-4.8.3.tar.gz", hash = "sha256:7225e57d7cef530aa7ebbb3892493002025b45e894be1d5cb0b78b9e8293ec2c", size = 241354, upload-time = "2025-12-18T18:44:43.299Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/06/ab/17e43f841a4886b6f4bd2e6cfb14ce5c2dcf20e63d1c2b2ca3279a2370d9/social_auth_core-4.8.7.tar.gz", hash = "sha256:30f88822d5c72e07a3dd080daff81464e262b83794c75cf636fc81241d2a253c", size = 248075, upload-time = "2026-04-23T11:38:45.181Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/bf/4c/48f54057e9284c60c51a01282351346a2662736386a72fd8a12801fb31a3/social_auth_core-4.8.3-py3-none-any.whl", hash = "sha256:a8ddb8a442416489a8f77f5fd472b29fc257627f8e3f770367db015b5171342b", size = 443537, upload-time = "2025-12-18T18:44:41.821Z" },
+ { url = "https://files.pythonhosted.org/packages/60/c5/d24db303db58efb2850274048975491efb5cc07c5f722b6a9dbc346cffa6/social_auth_core-4.8.7-py3-none-any.whl", hash = "sha256:c06d528bde0cf3d21e9e17af31c824c953985732123b005f54b20e67c9d0d8d8", size = 453014, upload-time = "2026-04-23T11:38:43.573Z" },
]
[[package]]