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.

feat(auth): pick the auth backdrop from where the visitor came from (#101354)

Rafael Audibertb716072b6fea
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 8d034ff8f72a..1acd90ce8f69 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -9771,47 +9771,47 @@ snapshots:
scenes-app-oauth-authorize--access-controls-apply--dark:
hash: v1.k794b7964.4f421d7fb891d0a77a0211d80ec9efc6899b84fb14cf331833cd175bdc738b10.doktEISQ1Rqmw7byfMxsgoY3VnXeI5pvbAXUr8yfsT0
scenes-app-oauth-authorize--access-controls-apply--light:
- hash: v1.k794b7964.c0af4f52e12413df84b314dfd97fe211228e6eba22a46c506f014e5c519e9c81.zQbQZB7mkQ8YILGkqI_Exzd7a5p9XqqXywrwE96dENU
+ hash: v1.k794b7964.327d8870ee3824291032975bb3e3c4ef9cfcbb852fdbe48bc4171fc22257a97d.hUBMUmi9_GsDBa3mryCkPtd3CC6BJDTyUVY0s62wB5g
scenes-app-oauth-authorize--all-scopes-optional--dark:
hash: v1.k794b7964.767c19354279e9bb950cc43ef82110119dbc2116300699a9adb0a049502221da.M09_tyl5B3_tDrOsts_8LKn6JwktVVhIF48ZlPNjW0M
scenes-app-oauth-authorize--all-scopes-optional--light:
- hash: v1.k794b7964.56cc992661af638417667462d39ecee57d74888486f9ae5214589e6fe56a0556.0mf8IIL0CVmLZS8QnPov2_5t5XetGeSjGK9TGEujRQM
+ hash: v1.k794b7964.b3b1d6ec2dd7fbfe1690e4b8f1c49206e084aa54df4eeb9274fe64d5c63ff83d.793MrlDdD7x3i_QDJYqUtJs7_CMQinaAQtFsnAjG40g
scenes-app-oauth-authorize--all-scopes-required--dark:
hash: v1.k794b7964.5c178e68dcf7ae3beeeeb18fc72f22f4ac33198230c3d03201e211f6f52c3706.RqPOVoCSmFGY1jWdGDf3esZFkOueSvAJHKmJBp7vpvk
scenes-app-oauth-authorize--all-scopes-required--light:
- hash: v1.k794b7964.03c7a17fdfde23344713839c0fcc53085da6160cece0e5f5ed893f701e9912db.nzLi2CnG6ZtBV_X6kZHVTWTYSU3PSn8mKjLqwk5UOcg
+ hash: v1.k794b7964.e0efa4768af4e4c1ac0f741d9c62bde840d3a205fa98742ef1b53771a957cfbb.G3POhS2LJF7fk8IJh0zmM17bx9mR4IS2PjieRGrhRmU
scenes-app-oauth-authorize--default-scopes--dark:
hash: v1.k794b7964.986767f854575bc076567098bc9284bebe23bb9d6cb98e9ce5f1615d7df0c1c8.kbh-ZWkN26OjfOLfAvKWancysKB5gLTFVfm-WayZRWY
scenes-app-oauth-authorize--default-scopes--light:
- hash: v1.k794b7964.c17d5f85d3c4f464500b0cf6875f055dcff866f1715e8c1052fbf60da1098aca.ssoXjuvF0tewN9PAvdmkfmQhw7D55dH61HmpqdJLT-E
+ hash: v1.k794b7964.247a8dd0c0990f5be55cd872c28380228cebbab4aaf3fc7278452d920da1b723.fuVL1CbsVt1WsMMm7c5dBlEzWjr1phCEyV9cWtQL54Q
scenes-app-oauth-authorize--every-scope-requested--dark:
hash: v1.k794b7964.5b544e241fa57ad7971a6872fce18c2d3e9dbbcfd5c6b4e2a861cc60683a7eda.SymJ-itmx0Mon5EALqTxh99r_VbtywIv8gFXju-9wRs
scenes-app-oauth-authorize--every-scope-requested--light:
- hash: v1.k794b7964.b5580b7ac56a2cc10607f9cc25789a353546f52dd79486bbe5139d4b0763738d.r-tI9Tyc1rXEe8K7vrZWug-yDlpq1X80lJMiIddxqHA
+ hash: v1.k794b7964.44941f1c545b5bbfd22ead5b060e347364df80978d620f78ad4ca95676aa5312.Kn7pilekcaNutp0Z0MVnUy0iGMHklqAQGacKc0lJLw8
scenes-app-oauth-authorize--every-scope-requested-scrolled-to-end--dark:
hash: v1.k794b7964.5b544e241fa57ad7971a6872fce18c2d3e9dbbcfd5c6b4e2a861cc60683a7eda.gLSvVEeKbmA7YUlD7Jw056daksT3C2VpGN86wBKJkMU
scenes-app-oauth-authorize--every-scope-requested-scrolled-to-end--light:
- hash: v1.k794b7964.b5580b7ac56a2cc10607f9cc25789a353546f52dd79486bbe5139d4b0763738d.cqBVJHNSXNfqJ5R-NS-CnNdIZv56Hm9Q74xPi0bOBx4
+ hash: v1.k794b7964.44941f1c545b5bbfd22ead5b060e347364df80978d620f78ad4ca95676aa5312.e3Uvl_ZP1tnSSMFZU-GzcBepe2Nz90xOVFtxOe0Q3SA
scenes-app-oauth-authorize--many-optional-scopes--dark:
hash: v1.k794b7964.ed7236b791f1885a80c8e308825334ea9c1fb33c67cbae1aa98c6fae12ff8c6d.wjzy_8MW69AdymaJU2hQR00ZPRM87GUk2hGbQuI-sE8
scenes-app-oauth-authorize--many-optional-scopes--light:
- hash: v1.k794b7964.60f3021e99d97e7ae17dd9f7e14e544490782b116a5d310af004e341f4742a5d.76J58bJGA_qnljF8s4V1xlIQuZP7VIMAWHvsk-NXrq0
+ hash: v1.k794b7964.ec94f3f2f59bbab1800f5dd8394116bbfae20e450e4d10c9adec81c3c99f4c77.Ee_2N8_xvH7aiggs6ETS8SxXc0R0Qf_iX5q56_DeLzY
scenes-app-oauth-authorize--required-read-floor-with-optional-write--dark:
hash: v1.k794b7964.ce56f2483e994a71329cb4680e6d27de7d21826ad659cde1e3aacef4d5fa76e9.q2kyWCaocImuyB_NYXx6kCgzekEe2ULgO-PzTVd0J3w
scenes-app-oauth-authorize--required-read-floor-with-optional-write--light:
- hash: v1.k794b7964.ba1df8cc7fe1f3431880aac8eeb18dd0c0b3d5ff0d6c9c9e04190dc85e734bc1.FMEaatH9lH-BnltaSdnCCXboYKpLaMBQ3dOrqkSUPf8
+ hash: v1.k794b7964.c3926f590bccb84062e2c45aa01a75e6477df138b1418f148bf79c67a34cd475.-dpBMlRXn3Y3lBQM7FYuXsFtIkYO9aw5UsSk0P6wl0I
scenes-app-oauth-authorize--wildcard-scope--dark:
hash: v1.k794b7964.9b96958067dc05edc0e8fcbe6192e5bd4b01a3c4b8a346a4e69e7ec6008397d8.gu62zWdVnryoqleY_jEV76T8ym5U7kyZvMovNElPAms
scenes-app-oauth-authorize--wildcard-scope--light:
- hash: v1.k794b7964.92689415467144e6534ee927866e25f4e855163f9a16b175f823c64a752e6ee2.XMeoQbtgFDkLFk_v4q287DleLU4npkwAawppAPNJouw
+ hash: v1.k794b7964.95034a6e25daf17b6feda53516e2bb3f681e7d036c1fcfb04ddd887f32515e8f.6mGoqUajhralYp32CniS-HRo0Or5AIEpNSXOC44xX7o
scenes-app-oauth-authorize--with-application-logo--dark:
hash: v1.k794b7964.945c0d75c83bfac039e99f66e8524ab3bd82a3cd4ede7da12b1ef831e77194b3.NrzqHM_SIujBzqtARGo8QxTVR5EHYWrFyDANxfIDIcc
scenes-app-oauth-authorize--with-application-logo--light:
- hash: v1.k794b7964.34838482a345917e9b34018a2571c77ebfe548edacffd71d0470a0e3ae1bd860.n1C5JIFO_pnLYRxE4_Ok6rEUFiocT7KCN7hanFeeBHU
+ hash: v1.k794b7964.1dcbf92f3d266d21bdbc6e437917f2d314ed940e742b19a730dae94409bb6c5c.HnZj5vfmED1h9E0sTIptiYW4oLndfqQwGgW2NiG25oo
scenes-app-oauth-authorize--with-required-scopes--dark:
hash: v1.k794b7964.f078f02667fddd8216ec0782c45f1fb95d8bbe6cae9887643e00f284216027cd.Zm5Vw89T37jz_UtxgdvbtIYH3Xo6X-pVxNK28AxFNiE
scenes-app-oauth-authorize--with-required-scopes--light:
- hash: v1.k794b7964.45df46d0f04131e089b74503a4066bc3a21995fd5096ceba882c8e39b651136c.ftk-4hgGc2ue_2uxUGcENeFd8o8gkz0OB6UYat5OLp8
+ hash: v1.k794b7964.8405b959e06c12f3570148cc6fc886506649388af3f863325b19318154b43a5f.NfwfuBsYksnILN1RfeaDmcaY-IUB9UYRJfS4C9tbIVA
scenes-app-people-cohorts--cohort-edit-dynamic--dark:
hash: v1.k794b7964.64bc82476828e61d420a9fc2ef3c550d45acf9c24f8d0bec694f803ecd147df7.eqlptg68mBa-l30eKEMGIEqcHeTSh2GAlhd0ybVid-k
scenes-app-people-cohorts--cohort-edit-dynamic--light:
diff --git a/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx b/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
index 8972b0868e48..7947be3aac20 100644
--- a/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
+++ b/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
@@ -4,6 +4,11 @@ import { IconGitlab, IconGoogle, IconKey } from 'lib/lemon-ui/icons'
import { SSOProvider } from '~/types'
+// IconGithub comes from the general icon set, which insets every glyph by 2 units inside a 24
+// viewBox. IconGoogle and IconGitlab are brand marks drawn to the edge, so in a shared 28px box
+// the GitHub mark rendered about 5px shorter. Cropping the inset lets all three fill the box.
+const GITHUB_VIEW_BOX = '2 2 20 20'
+
export const SocialLoginIcon = ({
provider,
...props
@@ -14,7 +19,7 @@ export const SocialLoginIcon = ({
if (provider === 'google-oauth2') {
return <IconGoogle {...props} />
} else if (provider === 'github') {
- return <IconGithub {...props} />
+ return <IconGithub {...props} viewBox={GITHUB_VIEW_BOX} />
} else if (provider === 'gitlab') {
return <IconGitlab {...props} />
} else if (provider === 'saml' || provider === 'oidc') {
diff --git a/frontend/src/scenes/authentication/login/Login.stories.tsx b/frontend/src/scenes/authentication/login/Login.stories.tsx
index cd3aa16b40bc..bf8799436bbf 100644
--- a/frontend/src/scenes/authentication/login/Login.stories.tsx
+++ b/frontend/src/scenes/authentication/login/Login.stories.tsx
@@ -1,3 +1,4 @@
+import { WEBSITE_REFERRER, setDocumentReferrer } from 'scenes/authentication/shared/authReferrer.mock'
import {
PENDING_OAUTH_CONNECTION_FIXTURE,
setPendingOAuthConnectionCookie,
@@ -9,6 +10,7 @@ import { useEffect } from 'react'
import { useStorybookMocks } from '~/mocks/browser'
import preflightJson from '~/mocks/fixtures/_preflight.json'
+import { arrivedFromWebsiteLogic } from '../shared/arrivedFromWebsiteLogic'
import { Login } from './Login'
import { loginLogic } from './loginLogic'
@@ -22,6 +24,7 @@ type StoryArgs = {
ssoEnforcement: 'none' | 'google-oauth2' | 'github' | 'gitlab' | 'saml'
generalError: 'none' | 'invalid_credentials' | 'code_based_verification_sent'
pendingOAuthConnection: boolean
+ arrivedFromWebsite: boolean
}
const meta: Meta<StoryArgs> = {
@@ -49,6 +52,7 @@ const meta: Meta<StoryArgs> = {
options: ['none', 'invalid_credentials', 'code_based_verification_sent'],
},
pendingOAuthConnection: { control: 'boolean', name: 'Pending OAuth connection' },
+ arrivedFromWebsite: { control: 'boolean', name: 'Arrived from posthog.com' },
},
args: {
cloud: true,
@@ -60,6 +64,7 @@ const meta: Meta<StoryArgs> = {
ssoEnforcement: 'none',
generalError: 'none',
pendingOAuthConnection: false,
+ arrivedFromWebsite: false,
},
}
export default meta
@@ -74,10 +79,12 @@ const Template: StoryFn<StoryArgs> = ({
ssoEnforcement,
generalError,
pendingOAuthConnection,
+ arrivedFromWebsite,
}) => {
const enforcement = ssoEnforcement === 'none' ? null : ssoEnforcement
// Set synchronously: the scene reads the cookie while it mounts during this same render.
setPendingOAuthConnectionCookie(pendingOAuthConnection ? PENDING_OAUTH_CONNECTION_FIXTURE : null)
+ setDocumentReferrer(arrivedFromWebsite ? WEBSITE_REFERRER : '')
useStorybookMocks({
get: {
@@ -101,6 +108,10 @@ const Template: StoryFn<StoryArgs> = ({
},
})
+ useEffect(() => {
+ arrivedFromWebsiteLogic.findMounted()?.actions.setArrivedFromWebsite(arrivedFromWebsite)
+ }, [arrivedFromWebsite])
+
useEffect(() => {
if (enforcement) {
loginLogic.actions.setLoginValue('email', '[email protected]')
@@ -146,3 +157,7 @@ PendingOAuthConnection.args = { pendingOAuthConnection: true }
export const EmailVerification: StoryFn<StoryArgs> = Template.bind({})
EmailVerification.args = { generalError: 'code_based_verification_sent' }
+
+export const ArrivedFromWebsite: StoryFn<StoryArgs> = Template.bind({})
+ArrivedFromWebsite.storyName = 'Arrived from posthog.com'
+ArrivedFromWebsite.args = { arrivedFromWebsite: true }
diff --git a/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.test.ts b/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.test.ts
new file mode 100644
index 000000000000..589d29366b70
--- /dev/null
+++ b/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.test.ts
@@ -0,0 +1,36 @@
+import { setDocumentReferrer } from './authReferrer.mock'
+
+import { expectLogic } from 'kea-test-utils'
+
+import { initKeaTests } from '~/test/init'
+
+import { arrivedFromWebsiteLogic, isWebsiteReferrer } from './arrivedFromWebsiteLogic'
+
+describe('arrivedFromWebsiteLogic', () => {
+ beforeEach(() => {
+ initKeaTests()
+ setDocumentReferrer('')
+ })
+
+ it.each([
+ ['https://posthog.com/', true],
+ ['https://posthog.com/pricing', true],
+ ['https://www.posthog.com/docs/getting-started', true],
+ ['', false],
+ ['https://app.posthog.com/login', false],
+ ['https://eu.posthog.com/signup', false],
+ ['https://posthog.com.phishing.example/', false],
+ ['https://example.com/?ref=https://posthog.com/', false],
+ ['not-a-url', false],
+ ])('reads %p as arrived-from-website %p', (referrer, expected) => {
+ expect(isWebsiteReferrer(referrer)).toBe(expected)
+ })
+
+ it('answers from the referrer the document was opened with', async () => {
+ setDocumentReferrer('https://posthog.com/pricing')
+ const logic = arrivedFromWebsiteLogic()
+ logic.mount()
+
+ await expectLogic(logic).toMatchValues({ arrivedFromWebsite: true })
+ })
+})
diff --git a/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.ts b/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.ts
new file mode 100644
index 000000000000..b37b1e5228e3
--- /dev/null
+++ b/frontend/src/scenes/authentication/shared/arrivedFromWebsiteLogic.ts
@@ -0,0 +1,45 @@
+import { LogicWrapper, MakeLogicType, actions, afterMount, kea, path, reducers } from 'kea'
+
+// Only arrives when the website keeps the referrer, which it does for app links alone.
+const WEBSITE_HOSTNAMES = new Set(['posthog.com', 'www.posthog.com'])
+
+export function isWebsiteReferrer(referrer: string): boolean {
+ if (!referrer) {
+ return false
+ }
+ try {
+ return WEBSITE_HOSTNAMES.has(new URL(referrer).hostname)
+ } catch {
+ return false
+ }
+}
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface arrivedFromWebsiteLogicValues {
+ arrivedFromWebsite: boolean
+}
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface arrivedFromWebsiteLogicActions {
+ setArrivedFromWebsite: (arrivedFromWebsite: boolean) => { arrivedFromWebsite: boolean }
+}
+
+export type arrivedFromWebsiteLogicType = MakeLogicType<arrivedFromWebsiteLogicValues, arrivedFromWebsiteLogicActions>
+
+export const arrivedFromWebsiteLogic: LogicWrapper<arrivedFromWebsiteLogicType> = kea<arrivedFromWebsiteLogicType>([
+ path(['scenes', 'authentication', 'shared', 'arrivedFromWebsiteLogic']),
+ actions({
+ setArrivedFromWebsite: (arrivedFromWebsite: boolean) => ({ arrivedFromWebsite }),
+ }),
+ reducers({
+ arrivedFromWebsite: [
+ false,
+ {
+ setArrivedFromWebsite: (_, { arrivedFromWebsite }) => arrivedFromWebsite,
+ },
+ ],
+ }),
+ afterMount(({ actions }) => {
+ actions.setArrivedFromWebsite(isWebsiteReferrer(document.referrer))
+ }),
+])
diff --git a/frontend/src/scenes/authentication/shared/authReferrer.mock.ts b/frontend/src/scenes/authentication/shared/authReferrer.mock.ts
new file mode 100644
index 000000000000..a95e0a498845
--- /dev/null
+++ b/frontend/src/scenes/authentication/shared/authReferrer.mock.ts
@@ -0,0 +1,5 @@
+export const WEBSITE_REFERRER = 'https://posthog.com/pricing'
+
+export function setDocumentReferrer(referrer: string): void {
+ Object.defineProperty(document, 'referrer', { value: referrer, configurable: true })
+}
diff --git a/frontend/src/scenes/authentication/shared/authScene/AuthScene.scss b/frontend/src/scenes/authentication/shared/authScene/AuthScene.scss
index 0b652a03723a..5c5fd6f66174 100644
--- a/frontend/src/scenes/authentication/shared/authScene/AuthScene.scss
+++ b/frontend/src/scenes/authentication/shared/authScene/AuthScene.scss
@@ -10,17 +10,19 @@
--primary-3000-button-border-hover: var(--primary-3000-button-border-hover-light);
--color-text-warning: var(--color-text-primary);
- // The dark-mode block below is the only thing that repaints these.
- --auth-scene-backdrop-top: #cfe0ae;
- --auth-scene-backdrop-mid: #b5cd8f;
- --auth-scene-backdrop-bottom: #9dbb78;
- --auth-scene-backdrop-glow: rgb(255 253 240 / 45%);
- --auth-scene-backdrop-ink: rgb(45 74 22 / 65%);
+ // The four blocks below are the only things that repaint these: one per referrer, per theme.
+ --auth-scene-backdrop-top: #eef4fa;
+ --auth-scene-backdrop-mid: #dbe8f4;
+ --auth-scene-backdrop-bottom: #c4d8ea;
+ --auth-scene-backdrop-glow: rgb(255 255 255 / 55%);
+ --auth-scene-backdrop-ink: rgb(30 56 84 / 62%);
--auth-scene-card-bg: #f6f5f0;
--auth-scene-card-border: #e3e0d4;
- --auth-scene-card-shadow: rgb(30 50 10 / 25%);
+ --auth-scene-card-shadow: rgb(20 44 72 / 18%);
--auth-scene-card-ink: #111;
--auth-scene-card-ink-muted: rgb(17 17 17 / 58%);
+ --auth-scene-note-bg: #fbfbf9;
+ --auth-scene-note-border: #c5c6bd;
background-color: var(--auth-scene-backdrop-mid);
background-image:
@@ -52,19 +54,42 @@
}
}
+// Continues the green posthog.com just showed the visitor.
+.AuthScene--fromWebsite {
+ --auth-scene-backdrop-top: #cfe0ae;
+ --auth-scene-backdrop-mid: #b5cd8f;
+ --auth-scene-backdrop-bottom: #9dbb78;
+ --auth-scene-backdrop-glow: rgb(255 253 240 / 45%);
+ --auth-scene-backdrop-ink: rgb(45 74 22 / 65%);
+ --auth-scene-card-shadow: rgb(30 50 10 / 25%);
+}
+
// The backdrop and the card are both opaque, so dark mode has to repaint them. Without this the
-// scene keeps its light sheets under the light-on-dark text the app tokens switch to.
+// scene keeps its light sheets under the light-on-dark text the app tokens switch to. The card
+// and the ink are the same whatever the visitor came from, so only the ramp splits again below.
[theme='dark'] .AuthScene {
- --auth-scene-backdrop-top: #1b2a10;
- --auth-scene-backdrop-mid: #14200b;
- --auth-scene-backdrop-bottom: #0d1707;
- --auth-scene-backdrop-glow: rgb(157 187 120 / 12%);
- --auth-scene-backdrop-ink: rgb(207 224 174 / 65%);
+ --auth-scene-backdrop-top: #16232f;
+ --auth-scene-backdrop-mid: #101a24;
+ --auth-scene-backdrop-bottom: #0a1119;
+ --auth-scene-backdrop-glow: rgb(150 185 220 / 12%);
+ --auth-scene-backdrop-ink: rgb(186 210 232 / 65%);
--auth-scene-card-bg: var(--color-bg-surface-primary);
--auth-scene-card-border: var(--color-border-primary);
--auth-scene-card-shadow: rgb(0 0 0 / 45%);
--auth-scene-card-ink: var(--color-text-primary);
--auth-scene-card-ink-muted: var(--color-text-secondary);
+ --auth-scene-note-bg: var(--color-bg-fill-primary);
+ --auth-scene-note-border: var(--color-border-primary);
+}
+
+// Reads as the same green the website showed, dimmed for a dark room. It has to follow the block
+// above, because the two selectors have equal specificity.
+[theme='dark'] .AuthScene--fromWebsite {
+ --auth-scene-backdrop-top: #1b2a10;
+ --auth-scene-backdrop-mid: #14200b;
+ --auth-scene-backdrop-bottom: #0d1707;
+ --auth-scene-backdrop-glow: rgb(157 187 120 / 12%);
+ --auth-scene-backdrop-ink: rgb(207 224 174 / 65%);
}
// A band that sits flush inside a card, such as a sticky section header. It repeats the card's
@@ -124,8 +149,12 @@
}
}
-// Note callout — bold inside it is darker
+// Note callout. Its sheet has to repaint for dark mode, because the text inside it uses the app
+// tokens, which turn light.
.AuthScene__note {
+ background: var(--auth-scene-note-bg, #fbfbf9);
+ border-color: var(--auth-scene-note-border, #c5c6bd);
+
b {
color: var(--auth-scene-card-ink, #111);
}
diff --git a/frontend/src/scenes/authentication/shared/authScene/AuthSceneBackdrop.tsx b/frontend/src/scenes/authentication/shared/authScene/AuthSceneBackdrop.tsx
index 4d0b40f588ea..f284ae4b385b 100644
--- a/frontend/src/scenes/authentication/shared/authScene/AuthSceneBackdrop.tsx
+++ b/frontend/src/scenes/authentication/shared/authScene/AuthSceneBackdrop.tsx
@@ -1,14 +1,29 @@
import './AuthScene.scss'
+import { useValues } from 'kea'
import { type ReactNode } from 'react'
import { cn } from 'lib/utils/css-classes'
+import { arrivedFromWebsiteLogic } from '../arrivedFromWebsiteLogic'
+
/**
* Carries the light-mode button tokens in AuthScene.scss as well as the backdrop, which is what
* turns LemonButton's primary amber on these screens. Owns no layout, so a scene that manages its
* own height and scrolling can share it with the ones that use {@link AuthScene}.
*/
export function AuthSceneBackdrop({ className, children }: { className?: string; children: ReactNode }): JSX.Element {
- return <div className={cn('AuthScene font-sans text-primary', className)}>{children}</div>
+ const { arrivedFromWebsite } = useValues(arrivedFromWebsiteLogic)
+
+ return (
+ <div
+ className={cn(
+ 'AuthScene font-sans text-primary',
+ arrivedFromWebsite && 'AuthScene--fromWebsite',
+ className
+ )}
+ >
+ {children}
+ </div>
+ )
}
diff --git a/frontend/src/scenes/authentication/signup/Signup.tsx b/frontend/src/scenes/authentication/signup/Signup.tsx
index 4d7153bd231a..6b3d188eae79 100644
--- a/frontend/src/scenes/authentication/signup/Signup.tsx
+++ b/frontend/src/scenes/authentication/signup/Signup.tsx
@@ -143,7 +143,7 @@ function SignupEmailPanel(): JSX.Element {
Trying to join an existing organization?
</button>
{showJoinOrg && (
- <p className="AuthScene__note mt-3 py-3 px-3.5 text-xs leading-relaxed text-secondary text-left bg-[#fbfbf9] border border-dashed border-[#c5c6bd] rounded">
+ <p className="AuthScene__note mt-3 py-3 px-3.5 text-xs leading-relaxed text-secondary text-left border border-dashed rounded">
You'll need your invite link. When a teammate invites you, we email you a personal link.
Didn't get one? Check spam, or ask them to resend it from their members settings.
</p>
@@ -257,7 +257,7 @@ function SignupAuthPanel(): JSX.Element {
</div>
)}
{passkeyRegistered ? (
- <div className="AuthScene__note text-center py-3 px-3.5 text-xs leading-relaxed text-secondary bg-[#fbfbf9] border border-dashed border-[#c5c6bd] rounded">
+ <div className="AuthScene__note text-center py-3 px-3.5 text-xs leading-relaxed text-secondary border border-dashed rounded">
Passkey registered. Continue below.
</div>
) : (
diff --git a/frontend/src/scenes/authentication/verify-email/VerifyEmailForm.tsx b/frontend/src/scenes/authentication/verify-email/VerifyEmailForm.tsx
index 951e7604457d..8a4447c0e244 100644
--- a/frontend/src/scenes/authentication/verify-email/VerifyEmailForm.tsx
+++ b/frontend/src/scenes/authentication/verify-email/VerifyEmailForm.tsx
@@ -62,7 +62,7 @@ function NotSeeingIt(): JSX.Element {
Not seeing it?
</button>
{open && (
- <div className="AuthScene__note mt-3 w-full py-3 px-3.5 text-xs leading-relaxed text-secondary text-left bg-[#fbfbf9] border border-dashed border-[#c5c6bd] rounded">
+ <div className="AuthScene__note mt-3 w-full py-3 px-3.5 text-xs leading-relaxed text-secondary text-left border border-dashed rounded">
<p className="m-0 mb-2.5 font-semibold text-primary">Before we resend, three quick checks:</p>
<div className="flex flex-col gap-2">
{CHECKLIST.map((item, i) => (