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.

fix(auth): route blocked signups to support modal (#72582)

Eleftheria Trivyzakib5da0869e8ab
diff --git a/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx b/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
index e6759b5114d3..47bf93873e57 100644
--- a/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
+++ b/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
@@ -4,8 +4,11 @@ import { useEffect, useState } from 'react'
import { IconArrowLeft } from '@posthog/icons'
import { LemonButton } from '@posthog/lemon-ui'
+import { supportLogic } from 'lib/components/Support/supportLogic'
import { LemonBanner } from 'lib/lemon-ui/LemonBanner'
+import { Link } from 'lib/lemon-ui/Link'
import { SpinnerOverlay } from 'lib/lemon-ui/Spinner/Spinner'
+import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { SceneExport } from 'scenes/sceneTypes'
import { userLogic } from '../../../userLogic'
@@ -28,13 +31,32 @@ export function SignupForm(): JSX.Element | null {
signupPanelOnboardingManualErrors,
isSignupPanel2Submitting,
signupPanel2ManualErrors,
+ signupPanelEmail,
panel,
passkeySignupEnabled,
panelTitle,
} = useValues(signupLogic)
const { setPanel } = useActions(signupLogic)
+ const { preflight } = useValues(preflightLogic)
+ const { openSupportForm } = useActions(supportLogic)
const [showSpinner, setShowSpinner] = useState(true)
+ const supportLink = preflight?.cloud ? (
+ <>
+ {' '}
+ <Link
+ data-attr="login-error-contact-support"
+ onClick={(e) => {
+ e.preventDefault()
+ openSupportForm({ kind: 'support', target_area: 'login', email: signupPanelEmail.email })
+ }}
+ >
+ Contact us
+ </Link>{' '}
+ to resolve this.
+ </>
+ ) : null
+
useEffect(() => {
setShowSpinner(true)
const t = setTimeout(() => {
@@ -52,6 +74,7 @@ export function SignupForm(): JSX.Element | null {
<LemonBanner type="error">
{signupPanelOnboardingManualErrors.generic?.detail ||
'Could not complete your signup. Please try again.'}
+ {supportLink}
</LemonBanner>
)}
{panel === 0 ? (
@@ -99,6 +122,7 @@ export function SignupForm(): JSX.Element | null {
{!isSignupPanel2Submitting && signupPanel2ManualErrors?.generic && (
<LemonBanner type="error">
{signupPanel2ManualErrors.generic?.detail || 'Could not complete your signup. Please try again.'}
+ {supportLink}
</LemonBanner>
)}
{panel === 0 ? (
diff --git a/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx b/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
index e92c0950dd97..9d3092b21a75 100644
--- a/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
+++ b/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
@@ -8,6 +8,7 @@ import SignupReferralSource from 'lib/components/SignupReferralSource'
import SignupRoleSelect from 'lib/components/SignupRoleSelect'
import passkeyLogo from 'lib/components/SocialLoginButton/passkey.svg'
import { SocialLoginButtons } from 'lib/components/SocialLoginButton/SocialLoginButton'
+import { supportLogic } from 'lib/components/Support/supportLogic'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { LemonField } from 'lib/lemon-ui/LemonField'
import { LemonInput } from 'lib/lemon-ui/LemonInput/LemonInput'
@@ -325,6 +326,7 @@ function SignupProfilePanel(): JSX.Element {
} = useValues(signupLogic)
const { preflight } = useValues(preflightLogic)
const { setTurnstileToken, setPanel } = useActions(signupLogic)
+ const { openSupportForm } = useActions(supportLogic)
const submitLabel = !preflight?.demo
? 'Create account'
@@ -374,6 +376,26 @@ function SignupProfilePanel(): JSX.Element {
{signupPanelOnboardingManualErrors?.generic && (
<div className="mb-4 py-2.5 px-3 text-sm leading-normal text-primary text-left bg-danger-highlight border border-danger rounded">
<span>{signupPanelOnboardingManualErrors.generic.detail || 'Could not complete your signup.'}</span>
+ {preflight?.cloud && (
+ <>
+ {' '}
+ <Link
+ data-attr="login-error-contact-support"
+ onClick={(e) => {
+ e.preventDefault()
+ openSupportForm({
+ kind: 'support',
+ target_area: 'login',
+ email: signupPanelEmail.email,
+ })
+ }}
+ className="font-semibold no-underline cursor-pointer hover:underline hover:underline-offset-2 text-warning"
+ >
+ Contact us
+ </Link>{' '}
+ <span>to resolve this.</span>
+ </>
+ )}
</div>
)}
<Form
diff --git a/posthog/workos_radar.py b/posthog/workos_radar.py
index dab482be01d6..54a6a17eedac 100644
--- a/posthog/workos_radar.py
+++ b/posthog/workos_radar.py
@@ -34,9 +34,7 @@ WORKOS_RADAR_BYPASS_REDIS_KEY = "workos_radar_bypass_emails"
class SuspiciousAttemptBlocked(APIException):
status_code = 403
- default_detail = (
- "Your account has been flagged for suspicious activity. Please contact [email protected] to resolve this."
- )
+ default_detail = "Your account has been flagged for suspicious activity."
default_code = "suspicious_attempt_blocked"
default_type = "authentication_error"