Sign-in look: the client's logo or the site's name on a dark panel beside the form (whiteLabel.signIn)

On by default with whiteLabel. The login screen and the 2FA screens get the look through AdminLogo and
SafeTotpView, which every site already has in its import map: an upgrade needs no edit. allScreens adds one
provider (SignInLook) for forgot / reset password, first user and logout; a production start leaves it out
when the import map on disk lacks it. Logo and name come from Site settings: no new field, no migration.
Language links through GET /api/ipal/admin-language (Payload's own cookie, back to an admin path only).
Options: accent, logoMadeFor, languages, svgLogo; whiteLabel.brandAccess 'admin'. The 2FA code boxes get
names for screen readers. Reference site and starter: allScreens on. Docs, agent guide, skills, tests.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 20:35:33 +01:00
co-authored by Claude Fable 5.2
parent e821d52d19
commit b6c91a3a11
38 changed files with 1792 additions and 21 deletions
+8 -2
View File
@@ -188,7 +188,7 @@ export default buildConfig({
seo: { collections: ['pages'] },
forms: { redirectRelationships: ['pages'] },
twoFactor: { issuer: '<Client name>', plugin: payloadTotp },
whiteLabel: true,
whiteLabel: { signIn: { allScreens: true } }, // client's logo / name on every sign-in screen (white-label.md)
indexNow: true,
// consentLog is on by default (1.17.0): consent-records + POST /api/ipal/consent; `consentLog: false` turns it off.
// Postgres / SQLite: pnpm payload migrate:create consent-log, applied in the same deploy.
@@ -207,7 +207,7 @@ are never added to a new site. Local `.env` with `PAYLOAD_SECRET` ≥ 32 charact
One language: one entry in `locales`, no `[locale]` folder (i18n.md).
**Check.** `pnpm payload generate:importmap` (whiteLabel adds admin components) and `pnpm generate:types` without
errors (the import map lists `@intecion/ipal-kit/admin#TotpRedirectProvider` and `#SafeTotpView`); `pnpm dev`, `/admin`: first-user screen → after saving, TOTP setup is enforced (`/admin/setup-totp?back=%2Fadmin`, QR, no reloading);
errors (the import map lists `@intecion/ipal-kit/admin#TotpRedirectProvider`, `#SafeTotpView` and `#SignInLook`); `pnpm dev`, `/admin`: first-user screen → after saving, TOTP setup is enforced (`/admin/setup-totp?back=%2Fadmin`, QR, no reloading);
the panel shows Site settings, Site integrations, Cookies, Form messages, the Forms group, Consent records.
`curl -s -o /dev/null -w '%{http_code}' -X POST localhost:3000/api/ipal/consent -H 'content-type: application/json'
-d '{"id":"0123456789abcdef","version":1,"state":{"necessary":true,"functional":false,"analytics":false,"marketing":false}}'` → `201`.
@@ -294,6 +294,12 @@ the panel shows Site settings, Site integrations, Cookies, Form messages, the Fo
win; a function `(global) => global` takes over). Without `revalidatePath` global saves wait for the ISR window.
- `whiteLabel: { credit: false, titleSuffix, settingsSlug, logoField, … }`; with `whiteLabel` the plugin overrides
`graphics.Logo/Icon` — your own graphics only without it.
- Sign-in screens (`whiteLabel.signIn`, on): a dark panel with the client's logo or the site's name beside the
form; the logo and name are Site settings fields (no env var, no migration). `allScreens: true` (in the config
above) adds the provider `SignInLook` to the import map and covers forgot / reset password, first user and
logout. `accent: '#hex'`, `logoMadeFor: 'dark'` (a white logo), `languages: false`, `svgLogo: false`;
`signIn: false` = Payload's screens; `brandAccess: 'admin'` = only admins change name, logo and icon.
Check: `/admin/login` and `/admin/forgot` show the panel, also at a phone width; do not write login CSS by hand.
- Panel link preview (`adminMeta`, on): noindex/nofollow, "— <site> | Panel" suffix, site name, description and
preview image (`/api/ipal/admin-og`) from Site settings; `agency` names who supports the technology (default
Intecion.com). Turn off: `adminMeta: false`, `agency: false`; your own `admin.meta` keys win. Check: