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: remove passkey signup flag (#74969)

Reece Jonesc03321197b03
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index c84d6509983a..5e1b41924e1e 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -7479,13 +7479,13 @@ snapshots:
scenes-other-integration-landing-page--not-connected--light:
hash: v1.k794b7964.fe31b9b4308a40ebe93aaf37ac256bc1a21917798708dada68092982307706ac.AaXZuU22qSzLFz9K3r7uKn1dFqRUC5CwW2v3u3R-z6A
scenes-other-invitesignup--cloud--dark:
- hash: v1.k794b7964.fbfe7f196d7778852709e423214508735abf8222696712feaa99336947ea99b2.ZTI8r02bUMco92tIS-bB310jR2h4lVsruxTUO4yl-fQ
+ hash: v1.k794b7964.9c70f4fe88faeec4aa965da2e709e0c280257173236a00470581eb72ead0730b.k6WHxlxSY5tnERc4hJE2SqPO-hZjLeAfgoAbccg576E
scenes-other-invitesignup--cloud--light:
- hash: v1.k794b7964.5d566f9d6c84fb2fb5563c330c28c8167f25f6c7267474b41e5f265557069cc1.XD436wV8wjYWz88Z3YJsvdSMpR2Fa7tYVf--nguJOAs
+ hash: v1.k794b7964.81f5a665de20393870330beb53550a85165fd9874b5d7dd1e184e0f23a7d4492.G5IIB099TmgJ7Ep2uP_Ek-IEx3q8jJzI4XolrJQrfMI
scenes-other-invitesignup--cloud-eu--dark:
- hash: v1.k794b7964.fbfe7f196d7778852709e423214508735abf8222696712feaa99336947ea99b2.8mmxiIEV3dV6g_umeoSDbbDNTFbiTsc0j90yKNBwgIs
+ hash: v1.k794b7964.9c70f4fe88faeec4aa965da2e709e0c280257173236a00470581eb72ead0730b.63t0RlAlT0bpsZNi5gT46pDNzLhT9t8_XoMw6LqHXcw
scenes-other-invitesignup--cloud-eu--light:
- hash: v1.k794b7964.5d566f9d6c84fb2fb5563c330c28c8167f25f6c7267474b41e5f265557069cc1.PpNJQKX8Myp8n9XP8AMvHmc3LE0nmIEOBTTMvLpluRQ
+ hash: v1.k794b7964.81f5a665de20393870330beb53550a85165fd9874b5d7dd1e184e0f23a7d4492.jXEPnUTAKAhhkVlTU9pp9XGnPt3jO-phG5OGD-zhfTI
scenes-other-invitesignup--invalid-link--dark:
hash: v1.k794b7964.cea0308bcaa33ed5eed68a00b2ac8ecb86658f97aa525843d8dda9c0dad6084d.NHJAeobEBIUSxmxrw0CmBFNxVkkcB1V-sHfuqotXNm4
scenes-other-invitesignup--invalid-link--light:
@@ -7499,9 +7499,9 @@ snapshots:
scenes-other-invitesignup--logged-in-wrong-user--light:
hash: v1.k794b7964.03cc599181ee3bdaf20f1fcfb029339c8070dd651873ddca7d6cdc841e2e28fb.Wsa7OacVqKU-o1vSuZtlEJ4fovgWQQxIn7S5YfvLFGY
scenes-other-invitesignup--self-hosted--dark:
- hash: v1.k794b7964.27d891cb8903c210d9fba6cfbd7c5d70187c38bf02110d063e762a1be3999331.Y4qzOaEnCaFtXKy3KYJrfqlw03-j4H6cyCPONBhfIz0
+ hash: v1.k794b7964.06fab3e7e5672837fcf542c94acfe35747ff61497c0b58a5305732c23e41ae16.R_3MuvfO6W8DPxUWDxSz6dPSlK_IpNNXNQ8Q1d2BHBk
scenes-other-invitesignup--self-hosted--light:
- hash: v1.k794b7964.6ab829ca368d1314e8fe14f939fe5ad0818daedc23b69950f0180be9913fe462.dBZodGTeQqfH5WeS697fRiWNcxOs2mdMEfb7Eqf6dPw
+ hash: v1.k794b7964.4bdd045a22ae313fbff2af3fe86008266662e3ef1b0a816bb25aebd9de315d96.JzwaxWGvLqEXldhzf2Y5opJSEpOFqcoRUBn2n75mJQI
scenes-other-invitesignup--sso-enforced-google--dark:
hash: v1.k794b7964.935e35e511472d1ef19c89d2fe724f6ad1ebf5593460c012e2c50894f447af06.pmw_p8bGv5n0ISh22ZbI8g2ZlNpTJPaAZmeRzaBxAZw
scenes-other-invitesignup--sso-enforced-google--light:
@@ -7855,17 +7855,17 @@ snapshots:
scenes-other-settings-organization-oauth-apps--with-apps--light:
hash: v1.k794b7964.b205875d375c5a66196e4ad55b794f719e0f8d98e3e5f7838da6f8e846294194.d6wj83uWgchZ8z3T8PNbeKl1NaCAhZFiVOm2hF6qKsk
scenes-other-signup--cloud--dark:
- hash: v1.k794b7964.b248919808e31deae097df68416ae6cde9ac96fccc5807ee6c6f811faa69997c.3qQAJiMLrd_vcB6QA2QzhJKiYWrCM7NBjHaNELIjzxQ
+ hash: v1.k794b7964.63b7a569a69b73aad46b1d578ad10991ba00bbc11ea8836a0d18fc04a82781dc.5aFLOjyAEnvDQheeu76uInEBEqiyoir7R-qPIIrMOp4
scenes-other-signup--cloud--light:
- hash: v1.k794b7964.27c9fe11ee114b73d977633139c307d2ee94b4e4aa94636ee4f6aeefc3d5bfd9.vExG0tzUHGIyR5g_oP4TvctROdttavT0Szl3S9TmwfY
+ hash: v1.k794b7964.a45baf69dbd597572ca0c053148890eb78370ed4f2e20b29d4399a3e18e3e71c.eKQYqun1VoCG4SGursB7gYxnqf7aWsRQVjzUyUt26S0
scenes-other-signup--self-hosted--dark:
- hash: v1.k794b7964.d1b1c3839059b6236e42adc6cc8426222382c2a1620037ab62987b409fc24935.Kh6scS05-vJs3Cmg_DE8F78ymfUMOVpbRCpFB2DawPg
+ hash: v1.k794b7964.0d4b7af69732e3d91ca3df3254e0dfb54eaedad2cffbb951cfbae5684c42a4d2.M_8SM_ILHOiFZqTI6H1zvCJC8-MWS9wH4VKW-ZaEkbw
scenes-other-signup--self-hosted--light:
- hash: v1.k794b7964.dc1402f7e79881a46cb3a866313670eb0e169d8bef6b2d91e8d38ab5a6db6ea6.Moq6gtyknfsJUsX4e86pjbXAmmaGjZMXWfggCcBVz8Q
+ hash: v1.k794b7964.34cfcea37e0f5190f5a360cba2651e4f7a3feacb3325556d4f2707f2cc3253e6.q2c9n0Qgn-jF27KPzXd4dmsnbFEZPn9OAe0HlZjx1_g
scenes-other-signup--self-hosted-sso--dark:
- hash: v1.k794b7964.c43637f379465ad41e63f2384eb1e392cd412905488cd27c391e43e409990df4.Viv46HJ-S7vx5dFVTARpLWk-zqnjIYQnYUXrGxtlCVM
+ hash: v1.k794b7964.13d89ad313c8b7e7d8076ebe99c9f879f6da893ec4f003812cb32edd65a53bf7.d-BPApDnbOEXwJKzNBl0ECJlB6wa7y18G6la72ArWXM
scenes-other-signup--self-hosted-sso--light:
- hash: v1.k794b7964.190be1de39735324eda178469338f02669ef085644b434c0c4ca6180f6eb7952.BcjwNDm3aTMYpxY5COmmj0spYJfsHDPLYOKNNKIBlsc
+ hash: v1.k794b7964.ca03495adc3b8d6d2c87e4cb14853cea28be9a3733d63065bf93c56cf1a4129e.SVQpnL6FTaa-j77LPWsLi8po1QG3RoTDdtS2vHeyB5M
scenes-other-toolbar--actions--dark:
hash: v1.k794b7964.0705132dd6b4cbf90f20ecbac58fce46946ee0700a063443c1e7f30105e6d23e.3l1620osQ1jKD_SJoZ2myZACS0SGDb5jerGaxB8rULM
scenes-other-toolbar--actions--light:
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 6fae3ff0b852..40973bc7a286 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -410,7 +410,6 @@ export const FEATURE_FLAGS = {
OWNER_ONLY_BILLING: 'owner-only-billing', // owner: @pawelcebula #team-billing
PAGE_REPORTS_AVERAGE_PAGE_VIEW: 'page-reports-average-page-view', // owner: @jordanm-posthog #team-web-analytics
PAGE_REPORTS_RANKED_URL_SEARCH: 'page-reports-ranked-url-search', // owner: @jordanm-posthog #team-web-analytics
- PASSKEY_SIGNUP_ENABLED: 'passkey-signup-enabled', // owner: @reecejones #team-platform-features
PASSWORD_PROTECTED_SHARES: 'password-protected-shares', // owner: @aspicer
PHAI_PLAN_MODE: 'phai-plan-mode', // owner: #team-posthog-ai
PHAI_SANDBOX_MODE: 'phai-sandbox-mode', // owner: #team-posthog-ai
diff --git a/frontend/src/scenes/authentication/invite-signup/inviteSignupLogic.ts b/frontend/src/scenes/authentication/invite-signup/inviteSignupLogic.ts
index a2139cb0eb59..8b885389cde6 100644
--- a/frontend/src/scenes/authentication/invite-signup/inviteSignupLogic.ts
+++ b/frontend/src/scenes/authentication/invite-signup/inviteSignupLogic.ts
@@ -1,5 +1,5 @@
import { startRegistration } from '@simplewebauthn/browser'
-import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'
+import { MakeLogicType, actions, kea, listeners, path, reducers, selectors } from 'kea'
import { forms } from 'kea-forms'
import type { DeepPartial, DeepPartialMap, FieldName, ValidationErrorType } from 'kea-forms'
import { loaders } from 'kea-loaders'
@@ -8,15 +8,11 @@ import posthog from 'posthog-js'
import api from 'lib/api'
import { ValidatedPasswordResult, validatePassword } from 'lib/components/PasswordStrength'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { getPasskeyErrorMessage } from 'scenes/settings/user/passkeys/utils'
import type { RegistrationBeginResponse } from 'scenes/settings/user/passkeySettingsLogic'
import { PrevalidatedInvite } from '~/types'
-import type { FeatureFlagsSet } from '../../../lib/logic/featureFlagLogic'
-
export enum ErrorCodes {
InvalidInvite = 'invalid_invite',
InvalidRecipient = 'invalid_recipient',
@@ -37,7 +33,6 @@ export interface AcceptInvitePayloadInterface {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface inviteSignupLogicValues {
- featureFlags: FeatureFlagsSet // featureFlagLogic
acceptedInvite: null
acceptedInviteLoading: boolean
challengeNonce: string | null
@@ -50,7 +45,6 @@ export interface inviteSignupLogicValues {
isSignupValid: boolean
passkeyError: string | null
passkeyRegistered: boolean
- passkeySignupEnabled: boolean
showSignupErrors: boolean
signup: AcceptInvitePayloadInterface
signupAllErrors: Record<string, any>
@@ -169,7 +163,6 @@ export interface inviteSignupLogicActions {
export interface inviteSignupLogicMeta {
__keaTypeGenInternalSelectorTypes: {
validatedPassword: (signup: AcceptInvitePayloadInterface) => ValidatedPasswordResult
- passkeySignupEnabled: (featureFlags: FeatureFlagsSet) => boolean
}
}
@@ -182,9 +175,6 @@ export type inviteSignupLogicType = MakeLogicType<
export const inviteSignupLogic = kea<inviteSignupLogicType>([
path(['scenes', 'authentication', 'invite-signup', 'inviteSignupLogic']),
- connect(() => ({
- values: [featureFlagLogic, ['featureFlags']],
- })),
actions({
setError: (payload: ErrorInterface) => ({ payload }),
registerPasskey: true,
@@ -373,12 +363,6 @@ export const inviteSignupLogic = kea<inviteSignupLogicType>([
return validatePassword(password)
},
],
- passkeySignupEnabled: [
- (s) => [s.featureFlags],
- (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): boolean => {
- return !!featureFlags[FEATURE_FLAGS.PASSKEY_SIGNUP_ENABLED]
- },
- ],
}),
listeners(({ actions, values }) => ({
setTurnstileToken: ({ token }) => {
diff --git a/frontend/src/scenes/authentication/invite-signup/variants/legacy/LegacyInviteSignup.tsx b/frontend/src/scenes/authentication/invite-signup/variants/legacy/LegacyInviteSignup.tsx
index 8ae6191ce706..ba0cc2aa38b8 100644
--- a/frontend/src/scenes/authentication/invite-signup/variants/legacy/LegacyInviteSignup.tsx
+++ b/frontend/src/scenes/authentication/invite-signup/variants/legacy/LegacyInviteSignup.tsx
@@ -205,7 +205,6 @@ function UnauthenticatedAcceptInvite({ invite }: { invite: PrevalidatedInvite })
passkeyRegistered,
isPasskeyRegistering,
passkeyError,
- passkeySignupEnabled,
challengeRequired,
turnstileSiteKey,
turnstileToken,
@@ -271,41 +270,34 @@ function UnauthenticatedAcceptInvite({ invite }: { invite: PrevalidatedInvite })
</LemonField.Pure>
{!areExtraFieldsHidden && (
<>
- {passkeySignupEnabled && (
+ {passkeyRegistered ? (
+ <div className="bg-surface-secondary rounded-lg p-4 text-center">
+ <img src={passkeyLogo} alt="Passkey" className="w-8 h-8 mx-auto mb-2" />
+ <p className="font-semibold mb-1">Passkey registered successfully!</p>
+ <p className="text-sm text-muted">
+ Complete the form below and press "Continue" to create your account.
+ </p>
+ </div>
+ ) : (
<>
- {passkeyRegistered ? (
- <div className="bg-surface-secondary rounded-lg p-4 text-center">
- <img src={passkeyLogo} alt="Passkey" className="w-8 h-8 mx-auto mb-2" />
- <p className="font-semibold mb-1">Passkey registered successfully!</p>
- <p className="text-sm text-muted">
- Complete the form below and press "Continue" to create your account.
- </p>
- </div>
- ) : (
- <LemonButton
- fullWidth
- type="secondary"
- center
- size="large"
- icon={
- <img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />
- }
- onClick={registerPasskey}
- loading={isPasskeyRegistering}
- disabled={isPasskeyRegistering}
- data-attr="invite-signup-passkey"
- >
- Sign up with passkey
- </LemonButton>
- )}
-
- {!passkeyRegistered && (
- <div className="flex items-center gap-3 my-4">
- <div className="flex-1 border-t border-border" />
- <span className="text-secondary text-sm">or use a password</span>
- <div className="flex-1 border-t border-border" />
- </div>
- )}
+ <LemonButton
+ fullWidth
+ type="secondary"
+ center
+ size="large"
+ icon={<img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />}
+ onClick={registerPasskey}
+ loading={isPasskeyRegistering}
+ disabled={isPasskeyRegistering}
+ data-attr="invite-signup-passkey"
+ >
+ Sign up with passkey
+ </LemonButton>
+ <div className="flex items-center gap-3 my-4">
+ <div className="flex-1 border-t border-border" />
+ <span className="text-secondary text-sm">or use a password</span>
+ <div className="flex-1 border-t border-border" />
+ </div>
</>
)}
{!passkeyRegistered && (
@@ -324,7 +316,6 @@ function UnauthenticatedAcceptInvite({ invite }: { invite: PrevalidatedInvite })
data-attr="password"
placeholder="••••••••••"
autoComplete="new-password"
- autoFocus={!passkeySignupEnabled}
disabled={isSignupSubmitting || passkeyRegistered}
/>
</LemonField>
diff --git a/frontend/src/scenes/authentication/invite-signup/variants/paper-desk/PaperDeskInviteSignup.tsx b/frontend/src/scenes/authentication/invite-signup/variants/paper-desk/PaperDeskInviteSignup.tsx
index fb6a7a65b47f..64c172fe80e5 100644
--- a/frontend/src/scenes/authentication/invite-signup/variants/paper-desk/PaperDeskInviteSignup.tsx
+++ b/frontend/src/scenes/authentication/invite-signup/variants/paper-desk/PaperDeskInviteSignup.tsx
@@ -99,7 +99,6 @@ function InviteNewUser({ invite }: { invite: PrevalidatedInvite }): JSX.Element
passkeyRegistered,
isPasskeyRegistering,
passkeyError,
- passkeySignupEnabled,
challengeRequired,
turnstileSiteKey,
turnstileToken,
@@ -272,7 +271,7 @@ function InviteNewUser({ invite }: { invite: PrevalidatedInvite }): JSX.Element
{!extraFieldsHidden && (
<InviteAlternativeLogins
invite={invite}
- showPasskey={passkeySignupEnabled && !passkeyRegistered}
+ showPasskey={!passkeyRegistered}
onRegisterPasskey={() => registerPasskey()}
passkeyRegistering={isPasskeyRegistering}
/>
diff --git a/frontend/src/scenes/authentication/signup/PaperDeskSignup.stories.tsx b/frontend/src/scenes/authentication/signup/PaperDeskSignup.stories.tsx
index eaae0abade33..d8939b7f93b9 100644
--- a/frontend/src/scenes/authentication/signup/PaperDeskSignup.stories.tsx
+++ b/frontend/src/scenes/authentication/signup/PaperDeskSignup.stories.tsx
@@ -37,7 +37,6 @@ const meta: Meta<StoryArgs> = {
viewMode: 'story',
featureFlags: {
[FEATURE_FLAGS.AUTH_FLOW_VARIANT]: 'paper-desk',
- [FEATURE_FLAGS.PASSKEY_SIGNUP_ENABLED]: true,
},
},
decorators: [
diff --git a/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx b/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
index 47bf93873e57..2999effd87af 100644
--- a/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
+++ b/frontend/src/scenes/authentication/signup/signupForm/SignupForm.tsx
@@ -12,8 +12,6 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { SceneExport } from 'scenes/sceneTypes'
import { userLogic } from '../../../userLogic'
-import { SignupPanel1 } from './panels/SignupPanel1'
-import { SignupPanel2 } from './panels/SignupPanel2'
import { SignupPanelAuth } from './panels/SignupPanelAuth'
import { SignupPanelEmail } from './panels/SignupPanelEmail'
import { SignupPanelOnboarding } from './panels/SignupPanelOnboarding'
@@ -29,11 +27,8 @@ export function SignupForm(): JSX.Element | null {
const {
isSignupPanelOnboardingSubmitting,
signupPanelOnboardingManualErrors,
- isSignupPanel2Submitting,
- signupPanel2ManualErrors,
signupPanelEmail,
panel,
- passkeySignupEnabled,
panelTitle,
} = useValues(signupLogic)
const { setPanel } = useActions(signupLogic)
@@ -65,71 +60,36 @@ export function SignupForm(): JSX.Element | null {
return () => clearTimeout(t)
}, [panel])
- // Use new 3-panel flow when passkey signup is enabled
- if (passkeySignupEnabled) {
- return !user ? (
- <div className="deprecated-space-y-2">
- {panelTitle ? <h2>{panelTitle}</h2> : null}
- {!isSignupPanelOnboardingSubmitting && signupPanelOnboardingManualErrors?.generic && (
- <LemonBanner type="error">
- {signupPanelOnboardingManualErrors.generic?.detail ||
- 'Could not complete your signup. Please try again.'}
- {supportLink}
- </LemonBanner>
- )}
- {panel === 0 ? (
- <SignupPanelEmail />
- ) : panel === 1 ? (
- <>
- <SignupPanelAuth />
- <div className="flex justify-center">
- <LemonButton
- icon={<IconArrowLeft />}
- onClick={() => setPanel(0)}
- size="small"
- center
- data-attr="signup-go-back"
- >
- or go back
- </LemonButton>
- </div>
- </>
- ) : (
- <>
- <SignupPanelOnboarding />
- <div className="flex justify-center">
- <LemonButton
- icon={<IconArrowLeft />}
- onClick={() => setPanel(panel - 1)}
- size="small"
- center
- data-attr="signup-go-back"
- >
- or go back
- </LemonButton>
- </div>
- </>
- )}
- {showSpinner ? <SpinnerOverlay sceneLevel /> : null}
- </div>
- ) : null
- }
-
- // Legacy 2-panel flow (when passkey signup is disabled)
return !user ? (
<div className="deprecated-space-y-2">
{panelTitle ? <h2>{panelTitle}</h2> : null}
- {!isSignupPanel2Submitting && signupPanel2ManualErrors?.generic && (
+ {!isSignupPanelOnboardingSubmitting && signupPanelOnboardingManualErrors?.generic && (
<LemonBanner type="error">
- {signupPanel2ManualErrors.generic?.detail || 'Could not complete your signup. Please try again.'}
+ {signupPanelOnboardingManualErrors.generic?.detail ||
+ 'Could not complete your signup. Please try again.'}
{supportLink}
</LemonBanner>
)}
{panel === 0 ? (
- <SignupPanel1 />
+ <SignupPanelEmail />
+ ) : panel === 1 ? (
+ <>
+ <SignupPanelAuth />
+ <div className="flex justify-center">
+ <LemonButton
+ icon={<IconArrowLeft />}
+ onClick={() => setPanel(0)}
+ size="small"
+ center
+ data-attr="signup-go-back"
+ >
+ or go back
+ </LemonButton>
+ </div>
+ </>
) : (
<>
- <SignupPanel2 />
+ <SignupPanelOnboarding />
<div className="flex justify-center">
<LemonButton
icon={<IconArrowLeft />}
diff --git a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx
deleted file mode 100644
index e02665530941..000000000000
--- a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { useValues } from 'kea'
-import { Form } from 'kea-forms'
-import { useEffect, useRef } from 'react'
-
-import { LemonButton, LemonInput } from '@posthog/lemon-ui'
-
-import PasswordStrength from 'lib/components/PasswordStrength'
-import { SocialLoginButtons } from 'lib/components/SocialLoginButton/SocialLoginButton'
-import { LemonField } from 'lib/lemon-ui/LemonField'
-import { Link } from 'lib/lemon-ui/Link'
-import RegionSelect from 'scenes/authentication/shared/RegionSelect'
-import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
-
-import { JoinExistingOrgLink } from '../JoinExistingOrgLink'
-import { signupLogic } from '../signupLogic'
-import { PendingInviteBanner } from './PendingInviteBanner'
-
-export function SignupPanel1(): JSX.Element | null {
- const { preflight, socialAuthAvailable } = useValues(preflightLogic)
- const { isSignupPanel1Submitting, validatedPassword, loginUrl, emailCaseNotice, pendingInvite, signupPanel1 } =
- useValues(signupLogic)
- const emailInputRef = useRef<HTMLInputElement | null>(null)
-
- useEffect(() => {
- // There's no password in the demo environment
- emailInputRef?.current?.focus()
- }, [preflight?.demo])
-
- if (pendingInvite) {
- return <PendingInviteBanner invite={pendingInvite} email={signupPanel1.email} />
- }
-
- return (
- <div className="deprecated-space-y-4 Signup__panel__1">
- <RegionSelect />
- {!preflight?.demo && socialAuthAvailable && (
- <>
- <SocialLoginButtons caption="Sign up with" bottomDivider className="mt-6" />
- <p className="text-secondary text-center mb-0">Or use email & password</p>
- </>
- )}
- <Form logic={signupLogic} formKey="signupPanel1" className="deprecated-space-y-4" enableFormOnSubmit>
- <LemonField
- name="email"
- label="Email"
- help={emailCaseNotice && <span className="text-warning">{emailCaseNotice}</span>}
- >
- <LemonInput
- className="ph-ignore-input"
- autoFocus
- data-attr="signup-email"
- placeholder="[email protected]"
- type="email"
- inputRef={emailInputRef}
- disabled={isSignupPanel1Submitting}
- />
- </LemonField>
- {!preflight?.demo && (
- <LemonField
- name="password"
- label={
- <div className="flex flex-1 items-center justify-between">
- <span>Password</span>
- <PasswordStrength validatedPassword={validatedPassword} />
- </div>
- }
- >
- <LemonInput
- type="password"
- autoComplete="new-password"
- className="ph-ignore-input"
- data-attr="password"
- placeholder="••••••••••"
- disabled={isSignupPanel1Submitting}
- />
- </LemonField>
- )}
- <LemonButton
- fullWidth
- type="primary"
- status="alt"
- center
- htmlType="submit"
- data-attr="signup-start"
- loading={isSignupPanel1Submitting}
- disabled={isSignupPanel1Submitting}
- size="large"
- >
- Continue
- </LemonButton>
- </Form>
- {!preflight?.demo &&
- (preflight?.cloud || preflight?.initiated) && (
- // If we're in the demo environment, login is unified with signup and it's passwordless
- // For now, if you're not on Cloud, you wouldn't see this page,
- // but future-proofing this (with `preflight.initiated`) in case this changes
- <div className="text-center mt-4">
- Already have an account?{' '}
- <Link to={loginUrl} data-attr="signup-login-link" className="font-bold">
- Log in
- </Link>
- </div>
- )}
- {!preflight?.demo && <JoinExistingOrgLink />}
- </div>
- )
-}
diff --git a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx
deleted file mode 100644
index 1795f3f462e9..000000000000
--- a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { Form } from 'kea-forms'
-
-import { LemonButton, LemonInput, Link } from '@posthog/lemon-ui'
-
-import SignupReferralSource from 'lib/components/SignupReferralSource'
-import SignupRoleSelect from 'lib/components/SignupRoleSelect'
-import { LemonField } from 'lib/lemon-ui/LemonField'
-import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
-
-import { signupLogic } from '../signupLogic'
-import { TurnstileChallenge } from '../TurnstileChallenge'
-
-const UTM_TAGS = 'utm_campaign=in-product&utm_tag=signup-header'
-
-export function SignupPanel2(): JSX.Element | null {
- const { preflight } = useValues(preflightLogic)
- const { setSignupPanel2ManualErrors } = useActions(signupLogic)
- const { isSignupPanel2Submitting, challengeRequired, turnstileSiteKey, turnstileToken, signupPanelEmail } =
- useValues(signupLogic)
- const { setTurnstileToken } = useActions(signupLogic)
-
- return (
- <div className="deprecated-space-y-4 Signup__panel__2">
- <Form logic={signupLogic} formKey="signupPanel2" className="deprecated-space-y-4" enableFormOnSubmit>
- <LemonField name="name" label="Your name">
- <LemonInput
- className="ph-ignore-input"
- autoFocus
- data-attr="signup-name"
- placeholder="Jane Doe"
- disabled={isSignupPanel2Submitting}
- />
- </LemonField>
- <LemonField name="organization_name" label="Organization name">
- <LemonInput
- className="ph-ignore-input"
- data-attr="signup-organization-name"
- placeholder="Hogflix Movies"
- disabled={isSignupPanel2Submitting}
- />
- </LemonField>
- <SignupRoleSelect />
- <SignupReferralSource disabled={isSignupPanel2Submitting} />
- <div className="divider" />
-
- {challengeRequired && turnstileSiteKey ? (
- <TurnstileChallenge
- siteKey={turnstileSiteKey}
- onSuccess={setTurnstileToken}
- tokenReceived={!!turnstileToken}
- email={signupPanelEmail.email}
- />
- ) : (
- <LemonButton
- fullWidth
- type="primary"
- center
- htmlType="submit"
- data-attr="signup-submit"
- onClick={() => setSignupPanel2ManualErrors({})}
- loading={isSignupPanel2Submitting}
- disabled={isSignupPanel2Submitting}
- status="alt"
- size="large"
- >
- {!preflight?.demo
- ? 'Create account'
- : !isSignupPanel2Submitting
- ? 'Enter the demo environment'
- : 'Preparing demo data…'}
- </LemonButton>
- )}
- </Form>
-
- <div className="text-center text-secondary">
- By {!preflight?.demo ? 'creating an account' : 'entering the demo environment'}, you agree to our{' '}
- <Link to={`https://posthog.com/terms?${UTM_TAGS}`} target="_blank">
- Terms of Service
- </Link>{' '}
- and{' '}
- <Link to={`https://posthog.com/privacy?${UTM_TAGS}`} target="_blank">
- Privacy Policy
- </Link>
- .
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanelAuth.tsx b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanelAuth.tsx
index 51f83b361651..0a3ad20e57b6 100644
--- a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanelAuth.tsx
+++ b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanelAuth.tsx
@@ -19,7 +19,6 @@ export function SignupPanelAuth(): JSX.Element | null {
passkeyRegistered,
isPasskeyRegistering,
passkeyError,
- passkeySignupEnabled,
} = useValues(signupLogic)
return (
@@ -35,40 +34,34 @@ export function SignupPanelAuth(): JSX.Element | null {
</LemonBanner>
)}
- {passkeySignupEnabled && (
- <>
- {passkeyRegistered ? (
- <div className="border border-success-lighter rounded-lg p-4 bg-success-highlight text-center">
- <img src={passkeyLogo} alt="Passkey" className="w-8 h-8 mx-auto mb-2" />
- <p className="font-semibold text-success mb-1">Passkey registered successfully!</p>
- <p className="text-secondary text-sm">
- You can use this passkey to sign in to your account.
- </p>
- </div>
- ) : (
- <LemonButton
- fullWidth
- type="secondary"
- center
- size="large"
- icon={<img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />}
- onClick={registerPasskey}
- loading={isPasskeyRegistering}
- disabled={isPasskeyRegistering}
- data-attr="signup-passkey"
- >
- Sign up with passkey
- </LemonButton>
- )}
-
- <div className="flex items-center gap-3 my-4">
- <div className="flex-1 border-t border-border" />
- <span className="text-secondary text-sm">or use a password</span>
- <div className="flex-1 border-t border-border" />
- </div>
- </>
+ {passkeyRegistered ? (
+ <div className="border border-success-lighter rounded-lg p-4 bg-success-highlight text-center">
+ <img src={passkeyLogo} alt="Passkey" className="w-8 h-8 mx-auto mb-2" />
+ <p className="font-semibold text-success mb-1">Passkey registered successfully!</p>
+ <p className="text-secondary text-sm">You can use this passkey to sign in to your account.</p>
+ </div>
+ ) : (
+ <LemonButton
+ fullWidth
+ type="secondary"
+ center
+ size="large"
+ icon={<img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />}
+ onClick={registerPasskey}
+ loading={isPasskeyRegistering}
+ disabled={isPasskeyRegistering}
+ data-attr="signup-passkey"
+ >
+ Sign up with passkey
+ </LemonButton>
)}
+ <div className="flex items-center gap-3 my-4">
+ <div className="flex-1 border-t border-border" />
+ <span className="text-secondary text-sm">or use a password</span>
+ <div className="flex-1 border-t border-border" />
+ </div>
+
<Form logic={signupLogic} formKey="signupPanelAuth" className="deprecated-space-y-4" enableFormOnSubmit>
<LemonField
name="password"
@@ -88,7 +81,6 @@ export function SignupPanelAuth(): JSX.Element | null {
className="ph-ignore-input"
data-attr="password"
placeholder="••••••••••"
- autoFocus={!passkeySignupEnabled}
disabled={isSignupPanelAuthSubmitting || passkeyRegistered}
/>
</LemonField>
diff --git a/frontend/src/scenes/authentication/signup/signupForm/signupLogic.ts b/frontend/src/scenes/authentication/signup/signupForm/signupLogic.ts
index 9843f357fe20..ebbf28224f3a 100644
--- a/frontend/src/scenes/authentication/signup/signupForm/signupLogic.ts
+++ b/frontend/src/scenes/authentication/signup/signupForm/signupLogic.ts
@@ -55,9 +55,6 @@ interface SignupEmailPrecheckResponse {
pending_invite?: PendingInvite | null
}
-// Keep SignupForm for backwards compatibility
-export interface SignupForm extends SignupPanelEmailForm, SignupPanelAuthForm, SignupPanelOnboardingForm {}
-
export const emailRegex: RegExp =
// oxlint-disable-next-line no-control-regex
/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/
@@ -73,10 +70,6 @@ export interface signupLogicValues {
error: string | null
isPasskeyRegistering: boolean
isPendingInviteResending: boolean
- isSignupPanel1Submitting: boolean
- isSignupPanel1Valid: boolean
- isSignupPanel2Submitting: boolean
- isSignupPanel2Valid: boolean
isSignupPanelAuthSubmitting: boolean
isSignupPanelAuthValid: boolean
isSignupPanelEmailSubmitting: boolean
@@ -88,32 +81,11 @@ export interface signupLogicValues {
panelTitle: string
passkeyError: string | null
passkeyRegistered: boolean
- passkeySignupEnabled: boolean
pendingInvite: PendingInvite | null
pendingInviteResent: boolean
- showSignupPanel1Errors: boolean
- showSignupPanel2Errors: boolean
showSignupPanelAuthErrors: boolean
showSignupPanelEmailErrors: boolean
showSignupPanelOnboardingErrors: boolean
- signupPanel1: SignupForm
- signupPanel1AllErrors: Record<string, any>
- signupPanel1Changed: boolean
- signupPanel1Errors: DeepPartialMap<SignupForm, ValidationErrorType>
- signupPanel1HasErrors: boolean
- signupPanel1ManualErrors: Record<string, any>
- signupPanel1Touched: boolean
- signupPanel1Touches: Record<string, boolean>
- signupPanel1ValidationErrors: DeepPartialMap<SignupForm, ValidationErrorType>
- signupPanel2: SignupForm
- signupPanel2AllErrors: Record<string, any>
- signupPanel2Changed: boolean
- signupPanel2Errors: DeepPartialMap<SignupForm, ValidationErrorType>
- signupPanel2HasErrors: boolean
- signupPanel2ManualErrors: Record<string, any>
- signupPanel2Touched: boolean
- signupPanel2Touches: Record<string, boolean>
- signupPanel2ValidationErrors: DeepPartialMap<SignupForm, ValidationErrorType>
signupPanelAuth: SignupPanelAuthForm
signupPanelAuthAllErrors: Record<string, any>
signupPanelAuthChanged: boolean
@@ -163,12 +135,6 @@ export interface signupLogicActions {
resetChallenge: () => {
value: true
}
- resetSignupPanel1: (values?: SignupForm) => {
- values?: SignupForm
- }
- resetSignupPanel2: (values?: SignupForm) => {
- values?: SignupForm
- }
resetSignupPanelAuth: (values?: SignupPanelAuthForm) => {
values?: SignupPanelAuthForm
}
@@ -211,32 +177,6 @@ export interface signupLogicActions {
setPendingInviteResent: (resent: boolean) => {
resent: boolean
}
- setSignupPanel1ManualErrors: (errors: Record<string, any>) => {
- errors: Record<string, any>
- }
- setSignupPanel1Value: (
- key: FieldName,
- value: any
- ) => {
- name: FieldName
- value: any
- }
- setSignupPanel1Values: (values: DeepPartial<SignupForm>) => {
- values: DeepPartial<SignupForm>
- }
- setSignupPanel2ManualErrors: (errors: Record<string, any>) => {
- errors: Record<string, any>
- }
- setSignupPanel2Value: (
- key: FieldName,
- value: any
- ) => {
- name: FieldName
- value: any
- }
- setSignupPanel2Values: (values: DeepPartial<SignupForm>) => {
- values: DeepPartial<SignupForm>
- }
setSignupPanelAuthManualErrors: (errors: Record<string, any>) => {
errors: Record<string, any>
}
@@ -282,38 +222,6 @@ export interface signupLogicActions {
setTurnstileToken: (token: string | null) => {
token: string | null
}
- submitSignupPanel1: () => {
- value: boolean
- }
- submitSignupPanel1Failure: (
- error: Error,
- errors: Record<string, any>
- ) => {
- error: Error
- errors: Record<string, any>
- }
- submitSignupPanel1Request: (signupPanel1: SignupForm) => {
- signupPanel1: SignupForm
- }
- submitSignupPanel1Success: (signupPanel1: SignupForm) => {
- signupPanel1: SignupForm
- }
- submitSignupPanel2: () => {
- value: boolean
- }
- submitSignupPanel2Failure: (
- error: Error,
- errors: Record<string, any>
- ) => {
- error: Error
- errors: Record<string, any>
- }
- submitSignupPanel2Request: (signupPanel2: SignupForm) => {
- signupPanel2: SignupForm
- }
- submitSignupPanel2Success: (signupPanel2: SignupForm) => {
- signupPanel2: SignupForm
- }
submitSignupPanelAuth: () => {
value: boolean
}
@@ -362,12 +270,6 @@ export interface signupLogicActions {
submitSignupPanelOnboardingSuccess: (signupPanelOnboarding: SignupPanelOnboardingForm) => {
signupPanelOnboarding: SignupPanelOnboardingForm
}
- touchSignupPanel1Field: (key: string) => {
- key: string
- }
- touchSignupPanel2Field: (key: string) => {
- key: string
- }
touchSignupPanelAuthField: (key: string) => {
key: string
}
@@ -382,16 +284,10 @@ export interface signupLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface signupLogicMeta {
__keaTypeGenInternalSelectorTypes: {
- validatedPassword: (signupPanelAuth: SignupPanelAuthForm, signupPanel1: SignupForm) => ValidatedPasswordResult
+ validatedPassword: (signupPanelAuth: SignupPanelAuthForm) => ValidatedPasswordResult
emailCaseNotice: (emailWasNormalized: boolean) => string | undefined
loginUrl: (searchParams: Record<string, any>) => string
- passkeySignupEnabled: (featureFlags: FeatureFlagsSet) => boolean
- panelTitle: (
- panel: number,
- passkeySignupEnabled: boolean,
- preflight: PreflightStatus | null,
- pendingInvite: PendingInvite | null
- ) => string
+ panelTitle: (panel: number, preflight: PreflightStatus | null, pendingInvite: PendingInvite | null) => string
}
}
@@ -681,158 +577,12 @@ export const signupLogic = kea<signupLogicType>([
}
},
},
- // Legacy forms for backwards compatibility during transition
- signupPanel1: {
- alwaysShowErrors: true,
- showErrorsOnTouch: true,
- defaults: {
- email: '',
- password: '',
- } as SignupForm,
- errors: ({ email, password }) => ({
- email: !email
- ? 'Please enter your email to continue'
- : !emailRegex.test(email)
- ? 'Please use a valid email address'
- : undefined,
- password: !values.preflight?.demo
- ? !password
- ? 'Please enter your password to continue'
- : values.validatedPassword.feedback || undefined
- : undefined,
- }),
- submit: async ({ email }, breakpoint) => {
- breakpoint()
- actions.setSignupPanel1ManualErrors({})
- let precheckResponse: SignupEmailPrecheckResponse
- try {
- precheckResponse = await api.create<SignupEmailPrecheckResponse>('api/signup/precheck', {
- email,
- })
- } catch (e: any) {
- if (e?.status === 409 || e?.code === 'account_exists') {
- actions.setSignupPanel1ManualErrors({
- email: 'There is already an account with this email address.',
- })
- actions.setPanel(0)
- return
- }
- const fieldError = e?.data?.email
- const emailErrorMessage = fieldError
- ? Array.isArray(fieldError)
- ? String(fieldError[0])
- : String(fieldError)
- : e?.detail || 'Could not verify your email. Please try again.'
- actions.setSignupPanel1ManualErrors({
- email: emailErrorMessage,
- })
- return
- }
- if (precheckResponse.email_exists || precheckResponse.code === 'account_exists') {
- actions.setSignupPanel1ManualErrors({
- email: precheckResponse.detail || 'There is already an account with this email address.',
- })
- actions.setPanel(0)
- return
- }
- const pendingInvite = precheckResponse.pending_invite ?? null
- if (pendingInvite && (router.values.searchParams as Record<string, string>).skip_invite_check !== '1') {
- actions.setPendingInvite(pendingInvite)
- return
- }
- actions.setPendingInvite(null)
- actions.setPanel(1)
- },
- },
- signupPanel2: {
- alwaysShowErrors: true,
- showErrorsOnTouch: true,
- defaults: {
- name: '',
- organization_name: '',
- role_at_organization: '',
- referral_source: '',
- referral_source_ai_prompt: '',
- } as SignupForm,
- errors: ({ name, role_at_organization }) => ({
- name: !name ? 'Please enter your name' : undefined,
- role_at_organization: !role_at_organization ? 'Please select your role in the organization' : undefined,
- }),
- submit: async (payload, breakpoint) => {
- breakpoint()
- try {
- const nextUrl = getRelativeNextPath(new URLSearchParams(location.search).get('next'), location)
-
- const signupData: Record<string, any> = {
- ...values.signupPanel1,
- ...payload,
- first_name: payload.name.split(' ')[0],
- last_name: payload.name.split(' ')[1] || undefined,
- organization_name: payload.organization_name || undefined,
- next_url: nextUrl ?? undefined,
- }
-
- if (values.turnstileToken && values.challengeNonce) {
- signupData.turnstile_token = values.turnstileToken
- signupData.challenge_nonce = values.challengeNonce
- }
-
- const res = await api.create('api/signup/', signupData)
-
- if (!payload.organization_name) {
- posthog.capture('sign up organization name not provided')
- }
-
- // it's ok to trust the url sent from the server
- // nosemgrep: javascript.browser.security.open-redirect.js-open-redirect
- location.href = res.redirect_url || '/'
- } catch (e) {
- const error = e as Record<string, any>
-
- if (error.code === 'challenge_required') {
- actions.setTurnstileToken(null)
- actions.setChallengeNonce(error.data?.extra?.challenge_nonce)
- actions.setTurnstileSiteKey(error.data?.extra?.turnstile_site_key)
- actions.setChallengeRequired(true)
- return
- }
-
- actions.resetChallenge()
-
- const emailError = error.data?.email
- if (emailError) {
- const message = Array.isArray(emailError) ? String(emailError[0]) : String(emailError)
- actions.setSignupPanel1ManualErrors({ email: message })
- actions.setPanel(0)
- return
- }
-
- if (error.code === 'throttled') {
- actions.setSignupPanel2ManualErrors({
- generic: {
- code: error.code,
- detail: 'Too many signup attempts. Please try again later.',
- },
- })
- } else {
- actions.setSignupPanel2ManualErrors({
- generic: {
- code: error.code,
- detail: error.detail,
- },
- })
- }
- throw e
- }
- },
- },
})),
selectors({
validatedPassword: [
- (s) => [s.signupPanelAuth, s.signupPanel1],
- (signupPanelAuth: SignupPanelAuthForm, signupPanel1: SignupForm): ValidatedPasswordResult => {
- // Use new form if available, fallback to legacy
- return validatePassword(signupPanelAuth.password || signupPanel1.password)
+ (s) => [s.signupPanelAuth],
+ (signupPanelAuth: SignupPanelAuthForm): ValidatedPasswordResult => {
+ return validatePassword(signupPanelAuth.password)
},
],
emailCaseNotice: [
@@ -848,17 +598,10 @@ export const signupLogic = kea<signupLogicType>([
return nextParam ? `/login?next=${encodeURIComponent(nextParam)}` : '/login'
},
],
- passkeySignupEnabled: [
- (s) => [s.featureFlags],
- (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): boolean => {
- return !!featureFlags[FEATURE_FLAGS.PASSKEY_SIGNUP_ENABLED]
- },
- ],
panelTitle: [
- (s) => [s.panel, s.passkeySignupEnabled, s.preflight, s.pendingInvite],
+ (s) => [s.panel, s.preflight, s.pendingInvite],
(
panel: number,
- passkeySignupEnabled: boolean,
preflight: null | import('../../../../types').PreflightStatus,
pendingInvite: PendingInvite | null
): string => {
@@ -869,20 +612,14 @@ export const signupLogic = kea<signupLogicType>([
return 'Explore PostHog yourself'
}
- if (passkeySignupEnabled) {
- switch (panel) {
- case 0:
- return 'Get started'
- case 1:
- return 'Choose how to sign in'
- case 2:
- return 'Tell us a bit about yourself'
- default:
- return 'Get started'
- }
+ switch (panel) {
+ case 1:
+ return 'Choose how to sign in'
+ case 2:
+ return 'Tell us a bit about yourself'
+ default:
+ return 'Get started'
}
-
- return panel === 0 ? 'Get started' : 'Tell us a bit about yourself'
},
],
}),
@@ -908,13 +645,7 @@ export const signupLogic = kea<signupLogicType>([
const hasUppercase = /[A-Z]/.test(email)
if (hasUppercase) {
- const normalizedEmail = email.toLowerCase()
- // Normalize for both form systems
- if (values.passkeySignupEnabled) {
- actions.setSignupPanelEmailValue('email', normalizedEmail)
- } else {
- actions.setSignupPanel1Value('email', normalizedEmail)
- }
+ actions.setSignupPanelEmailValue('email', email.toLowerCase())
actions.setEmailNormalized(true)
}
},
@@ -924,12 +655,6 @@ export const signupLogic = kea<signupLogicType>([
actions.normalizeEmailWithDelay(value)
}
},
- setSignupPanel1Value: ({ name, value }) => {
- if (name.toString() === 'email' && typeof value === 'string') {
- actions.setEmailNormalized(false)
- actions.normalizeEmailWithDelay(value)
- }
- },
setPasskeyRegistered: ({ registered }) => {
if (registered) {
// Advance to onboarding panel after successful passkey registration
@@ -938,11 +663,7 @@ export const signupLogic = kea<signupLogicType>([
},
setTurnstileToken: ({ token }) => {
if (token && values.challengeNonce) {
- if (values.passkeySignupEnabled) {
- actions.submitSignupPanelOnboarding()
- } else {
- actions.submitSignupPanel2()
- }
+ actions.submitSignupPanelOnboarding()
}
},
registerPasskey: async () => {
@@ -1029,14 +750,15 @@ export const signupLogic = kea<signupLogicType>([
// In demo mode no password is needed, so we can log in right away
// This allows us to give a quick login link in the `generate_demo_data` command
// X and Y are placeholders, irrelevant because the account should already exists
- actions.setSignupPanel1Values({ email })
- actions.setSignupPanel2Values({
+ actions.setSignupPanelEmailValues({ email })
+ actions.setSignupPanelOnboardingValues({
name: 'X',
organization_name: 'Y',
+ role_at_organization: 'other',
})
- actions.submitSignupPanel2()
+ actions.submitSignupPanelOnboarding()
} else {
- actions.setSignupPanel1Value('email', email)
+ actions.setSignupPanelEmailValue('email', email)
}
}
},
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 9d3092b21a75..947bf42c6ac5 100644
--- a/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
+++ b/frontend/src/scenes/authentication/signup/variants/paper-desk/PaperDeskSignup.tsx
@@ -194,7 +194,6 @@ function SignupAuthPanel(): JSX.Element {
signupPanelEmail,
isSignupPanelAuthSubmitting,
validatedPassword,
- passkeySignupEnabled,
passkeyRegistered,
isPasskeyRegistering,
passkeyError,
@@ -240,26 +239,25 @@ function SignupAuthPanel(): JSX.Element {
<span>{passkeyError}</span>
</div>
)}
- {passkeySignupEnabled &&
- (passkeyRegistered ? (
- <div className="PaperDesk__note text-center py-3 px-3.5 text-xs leading-relaxed text-secondary bg-[#fbfbf9] border border-dashed border-[#c5c6bd] rounded">
- Passkey registered. Continue below.
- </div>
- ) : (
- <LemonButton
- type="secondary"
- size="large"
- fullWidth
- icon={<img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />}
- onClick={registerPasskey}
- loading={isPasskeyRegistering}
- disabled={isPasskeyRegistering}
- data-attr="signup-passkey"
- center
- >
- Sign up with a passkey
- </LemonButton>
- ))}
+ {passkeyRegistered ? (
+ <div className="PaperDesk__note text-center py-3 px-3.5 text-xs leading-relaxed text-secondary bg-[#fbfbf9] border border-dashed border-[#c5c6bd] rounded">
+ Passkey registered. Continue below.
+ </div>
+ ) : (
+ <LemonButton
+ type="secondary"
+ size="large"
+ fullWidth
+ icon={<img src={passkeyLogo} alt="Passkey" className="object-contain w-7 h-7" />}
+ onClick={registerPasskey}
+ loading={isPasskeyRegistering}
+ disabled={isPasskeyRegistering}
+ data-attr="signup-passkey"
+ center
+ >
+ Sign up with a passkey
+ </LemonButton>
+ )}
{!passkeyRegistered && (
<div className="my-4 flex gap-3 items-center">
<span className="flex-1 h-px bg-[#e0e1d9]" />
diff --git a/playwright/e2e/signup.spec.ts b/playwright/e2e/signup.spec.ts
index 72078b032366..dc7472b61ca5 100644
--- a/playwright/e2e/signup.spec.ts
+++ b/playwright/e2e/signup.spec.ts
@@ -44,9 +44,7 @@ test.describe('Signup', () => {
config: {
enable_collect_everything: true,
},
- featureFlags: {
- 'passkey-signup-enabled': true,
- },
+ featureFlags: {},
isAuthenticated: false,
}
await route.fulfill({ json: response })