Skip to content

[PB-6703]: apply sub-account branding to the password recovery pages - #100

Open
victor-ferro wants to merge 4 commits into
feat/pb-6703-password-recoveryfrom
feat/pb-6703-recovery-pages-branding
Open

victor-ferro wants to merge 4 commits into
feat/pb-6703-password-recoveryfrom
feat/pb-6703-recovery-pages-branding

Conversation

@victor-ferro

Copy link
Copy Markdown
Contributor

What this does

The password recovery pages fell back to Internxt branding even when the sub-account had its own logo and primary colour. The three screens of the same flow showed different identities:

Screen Before After
/subaccount/login customer logo and colour unchanged
/subaccount/forgot-password Internxt logo and colour customer logo and colour
/subaccount/reset-password Internxt logo and colour customer logo and colour

Why it was missing

These views were written before dynamic branding landed on main (PB-6447). They never received the branding prop, and their buttons hardcoded #0071e3 instead of the CSS variables the login page already used. This is not a regression — they were born this way.

Changes

AuthPageSkeleton — the skeleton that lived inside SubAccountLoginPage moves to components/auth/, parameterising the only thing that differs between screens: the number of fields (inputRows). Without it, the recovery pages would show the default logo while branding loads and then swap it — exactly the wrong-brand flash the skeleton exists to prevent. SubAccountLoginPage drops 58 lines.

branding propForgotPasswordView and ResetPasswordView accept the optional AuthPageBranding prop and forward it to the layout. In ResetPasswordView it is enough to add it to the existing layoutProps object, which is already spread across both of its screens.

Brand colours — 4 places move from a hardcoded hex to CSS variables, using the exact same class string already used by the "Log in" button:

bg-[var(--sub-account-primary,#0071e3)] hover:bg-[var(--sub-account-primary-dark,#0077ed)]
active:bg-[var(--sub-account-primary-dark,#006edb)] text-[color:var(--sub-account-primary-contrast,#FFFFFF)]

Those are the Send reset link, Set new password and Request a new link buttons, plus the envelope icon on the "Check your inbox" screen.

How it was tested

Against a real branded partner in the local environment (console_hostname = localhost plus a branding row), not mocks:

  • All four screens pick up the customer logo and colour.
  • Contrast: with a light colour (#FFD400) the button label resolves to rgb(24,24,27) instead of white. The previous text-white would have been unreadable; --sub-account-primary-contrast handles it.
  • No regression for partners: /partners/forgot-password and /partners/reset-password still render rgb(0,113,227) with white text. The prop is optional and the var() fallbacks do their job.
  • No console errors. tsc, eslint and build all clean.

Notes for the reviewer

  • { logoUrl, styles: primaryColor ? styles : undefined } is now repeated in 3 pages. It could be extracted into a hook, but that would also mean touching SubAccountLoginPage; with only 3 call sites it does not seem worth it.
  • The "CLOUD ACCOUNT CONSOLE" label is still indigo rather than the brand colour. Same as on the login page, so it is left as is.

Stacked PR

Targets feat/pb-6703-password-recovery (#93), not main. It depends on AuthPageBranding (which arrives with the #92 merge) and on the recovery views themselves, which #93 creates.

@victor-ferro victor-ferro self-assigned this Aug 21, 2026
@victor-ferro
victor-ferro marked this pull request as ready for review August 21, 2026 15:56
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying object-storage-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: eef9725
Status: ✅  Deploy successful!
Preview URL: https://a740921f.object-storage-web.pages.dev
Branch Preview URL: https://feat-pb-6703-recovery-pages.object-storage-web.pages.dev

View logs

@victor-ferro
victor-ferro marked this pull request as draft August 21, 2026 15:58
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
object-storage-management-web eef9725 Commit Preview URL

Branch Preview URL
Sep 16 2026, 01:25 PM

@victor-ferro
victor-ferro marked this pull request as ready for review August 24, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants