Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: remove OAuth sources from PostHog attribution events

Devin AI21f9832346dd
diff --git a/backend/src/server/routes/v1/sso-router.ts b/backend/src/server/routes/v1/sso-router.ts
index 89b1fe14b0..bcc77eb312 100644
--- a/backend/src/server/routes/v1/sso-router.ts
+++ b/backend/src/server/routes/v1/sso-router.ts
@@ -28,7 +28,6 @@ import { addAuthOriginDomainCookie } from "@app/server/lib/cookie";
import { AuthMethod } from "@app/services/auth/auth-type";
import { OrgAuthMethod } from "@app/services/org/org-types";
import { getServerCfg } from "@app/services/super-admin/super-admin-service";
-import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";
const passport = new Authenticator({ key: "sso", userProperty: "passportUser" });
@@ -88,20 +87,6 @@ export const registerOauthMiddlewares = (server: FastifyZodProvider) => {
});
}
- if (!isUserCompleted && googleDistinctId) {
- void server.services.telemetry.sendPostHogEvents({
- event: PostHogEventTypes.UserSignedUp,
- distinctId: googleDistinctId,
- ...(orgId ? { organizationId: orgId } : {}),
- ...(orgName ? { organizationName: orgName } : {}),
- properties: {
- username: user.username,
- email: user.email ?? "",
- attributionSource: "Google OAuth"
- }
- });
- }
-
if (appCfg.OTEL_TELEMETRY_COLLECTION_ENABLED) {
authAttemptCounter.add(1, {
"infisical.user.email": email,
@@ -184,20 +169,6 @@ export const registerOauthMiddlewares = (server: FastifyZodProvider) => {
});
}
- if (!isUserCompleted && githubDistinctId) {
- void server.services.telemetry.sendPostHogEvents({
- event: PostHogEventTypes.UserSignedUp,
- distinctId: githubDistinctId,
- ...(orgId ? { organizationId: orgId } : {}),
- ...(orgName ? { organizationName: orgName } : {}),
- properties: {
- username: user.username,
- email: user.email ?? "",
- attributionSource: "GitHub OAuth"
- }
- });
- }
-
if (appCfg.OTEL_TELEMETRY_COLLECTION_ENABLED) {
authAttemptCounter.add(1, {
"infisical.user.email": email,
@@ -272,20 +243,6 @@ export const registerOauthMiddlewares = (server: FastifyZodProvider) => {
});
}
- if (!isUserCompleted && gitlabDistinctId) {
- void server.services.telemetry.sendPostHogEvents({
- event: PostHogEventTypes.UserSignedUp,
- distinctId: gitlabDistinctId,
- ...(orgId ? { organizationId: orgId } : {}),
- ...(orgName ? { organizationName: orgName } : {}),
- properties: {
- username: user.username,
- email: user.email ?? "",
- attributionSource: "GitLab OAuth"
- }
- });
- }
-
if (appCfg.OTEL_TELEMETRY_COLLECTION_ENABLED) {
authAttemptCounter.add(1, {
"infisical.user.email": email,