A logo that showed on a site's login screen shows on the new screens: any picture Site settings holds, an SVG included, as <img>; svgLogo: false refuses SVG (off by default); the list of allowed types is gone. The look at the file only avoids a broken picture: a file that is gone (404 / 410) or is no picture gives the name; anything else (no answer, a redirect, another status, over 512 KB) believes the upload. Redirects are still never followed by the server, and the body is read with the 512 KB cap. A test checks twelve kinds of logo that 1.17.0 shows. No plate stays the default. Docs, skills, changelog draft. Co-Authored-By: Claude Fable 5.2 <[email protected]>
5.6 KiB
Changelog draft — the sign-in look (for 1.17.1)
To be placed in docs/CHANGELOG.md by the release; the version number is the integration session's call.
Read before upgrading
The panel's sign-in page looks different on every site with whiteLabel. After the update the login screen and
the 2FA screens (code, setup) show a dark panel with the client's logo — or the site's name — beside the form, the
look IAPL now shares with IAWL. No edit, no generate:importmap, no migration, no new env var.
Keep Payload's screens: whiteLabel: { signIn: false }. Sites without whiteLabel: nothing changes.
Every logo that showed on the login screen before shows on the new screens (an SVG too): the logo is handled as the white label handled it until now. Two things to look at on such a site, each with a one-line way back:
- The logo stands straight on a dark panel (no plate — the owner's decision). A logo with dark letters:
signIn: { logoPlate: true }. - Editors can no longer change the site's name, logo and icon in Site settings (admins can): these are what the
public sign-in page shows.
whiteLabel: { brandAccess: 'editor' }gives them back.
Security
- The public preview-image endpoint could be made to fetch from a host named in the request.
GET /api/ipal/admin-ogresolved a site-relative logo address against the request's own host and fetched it with redirects followed, no timeout and no size limit;GET /api/ipal/admin-iconresolved the same way. Both now resolve against the site's configured origin only (serverURL, elseNEXT_PUBLIC_SERVER_URL), ask one address, never follow a redirect, give up after 5 s and stop reading at 512 KB.fetchPublicImage(exported) behaves so for every caller and takes{ timeoutMs }; new exportPUBLIC_IMAGE_TIMEOUT_MS. For a project: nothing to do whenserverURLis set (the starter sets it). A site withoutserverURLand withoutNEXT_PUBLIC_SERVER_URLloses the logo in its panel link preview (the site name is drawn) and the icon endpoint redirects to the media file — setserverURL. A logo or icon whose address answers with a redirect is no longer fetched by the server.
Added
- Sign-in look (
whiteLabel.signIn, on withwhiteLabel). A dark panel with the label "Administration panel", the client's logo (Site settings → Logo) or the site's name, and the panel's languages as links; the form beside it, in both admin themes; a band above the form on a phone. Logo and name come from Site settings: no env var, no new field, no schema change (MongoDB, Postgres, SQLite alike). With nothing set the panel shows the label and the site's host — no Payload or Intecion mark. The logo on a white plate is an option; the default is no plate. signIn: { allScreens: true }— the same look on forgot / reset password, create first user, logout and "unauthorized". Adds the providerSignInLook(one import-map entry:pnpm payload generate:importmap). The project starter writes it for new sites. A production start that does not find the entry inimportMap.jsleaves the provider out and logs what to run; the panel keeps working.- The logo: whatever Site settings → Logo holds, an SVG too, as an
<img>; fits 240 × 72 (it was up to 420 × 120), served from a generated size at least twice as wide when the media collection has one; alternative text = the site's name. Its file is asked once before it is printed (no redirect followed, 4 s, 512 KB): a file that is gone, or is no picture, gives the site's name instead of a broken picture; in any doubt the upload is believed. - Options:
signIn.accent(hex colour of the button, links and focus ring),signIn.logoPlate(a white plate),signIn.svgLogo: false(refuse an SVG logo),signIn.checkLogo: false,signIn.languages: false,whiteLabel.brandAccess('admin'with the look,'editor'as before; field-level access, no schema change). CSS variables--iapl-signin-*for a project'scustom.scss. - Language links before sign-in:
GET /api/ipal/admin-language?lng=<code>writes Payload's language cookie for a supported language and returns to the admin page it was opened from (public; 400 for an unknown language; never redirects off the admin route). Registered only with the sign-in look andlanguages !== false. - The 2FA code boxes have names for screen readers ("Digit 2 of 6") and ask a phone for the numeric keyboard (with the sign-in look).
- Exports:
SignInPanel,SignInLook(/admin);resolveSignInLook,loadSignInBrand,signInLogo,signInName,checkLogoFile,fitLogo,isSvgUpload,languageLinks,LANGUAGE_NAMES,signInCss,isHexColour,signInProviderActive,buildAdminLanguageEndpoint,adminPathFromReferer,SIGN_IN_LOOK,SIGN_IN_STYLE_ID,SIGN_IN_LOGO_BOX,SIGN_IN_NAME_MAX,ADMIN_LANGUAGE_PATHand their types.
Changed
AdminLogoprints the sign-in panel when the plugin gives itsignIn(the default withwhiteLabel); wired by hand without that prop it is the plain logo as before. The logo on the login screen is now shown inside 240 × 72 px (it was up to 420 × 120).- The credit line under the login form: full-strength muted colour and a hairline above it (it was 60 % opacity).
- The reference site and the starter use
whiteLabel: { signIn: { allScreens: true } }.
Requires project changes
None for the panel to work — but read the two points at the top. Recommended: allScreens (one config line, regenerate the import map). A project with its own CSS for the
login screen looks at the result after the update.