Login, account and email themes with Keycloakify #2

Öppen
öppnade 2026-10-08 14:52:46 +00:00 av supernaut · 4 kommentarer
Ägare

Own Swedish and English copy and the portal look on every screen in the sign-up, sign-in, enrolment and recovery path.

  • Login, account (multi-page mode) and email themes with Keycloakify. Pin its version.
  • Override sv and en message bundles inline in src/login/i18n.ts. Check strings with the web language-check skill.
  • Portal colours, type and logo. Footer links to terms, privacy and support.
  • CI builds the JAR with Maven and a JDK, copy it into the image and rebuild with kc.sh build.
  • Keep customisation to message overrides and CSS. Eject only pages that need it, and diff them after each upgrade.

Done when: the image ships the theme and every screen on the path shows reviewed copy.

Depends on: #1
Depends on: bitborg/bitborg-infra#575
Epic: bitborg/bitborg-docs#127

Own Swedish and English copy and the portal look on every screen in the sign-up, sign-in, enrolment and recovery path. - [ ] Login, account (multi-page mode) and email themes with Keycloakify. Pin its version. - [ ] Override `sv` and `en` message bundles inline in `src/login/i18n.ts`. Check strings with the web language-check skill. - [ ] Portal colours, type and logo. Footer links to terms, privacy and support. - [ ] CI builds the JAR with Maven and a JDK, copy it into the image and rebuild with `kc.sh build`. - [ ] Keep customisation to message overrides and CSS. Eject only pages that need it, and diff them after each upgrade. Done when: the image ships the theme and every screen on the path shows reviewed copy. Depends on: #1 Depends on: bitborg/bitborg-infra#575 Epic: bitborg/bitborg-docs#127
supernaut lade till detta till projektet Bitborg Keycloak 2026-10-08 14:55:59 +00:00
Upphovsperson
Ägare

Found in staging testing: the enrolment pages do not carry the username, so a password manager cannot tie the password to the account. Requirement for the login theme:

  • login-update-password: a username field (visible read-only, or hidden) with autocomplete="username" and the account's username, and the new password fields with autocomplete="new-password".
  • login-config-totp and the recovery-codes page: show which account is being set up.

Step order (password before TOTP) is fixed in the realm with required-action priorities.

Found in staging testing: the enrolment pages do not carry the username, so a password manager cannot tie the password to the account. Requirement for the login theme: - [ ] `login-update-password`: a username field (visible read-only, or hidden) with `autocomplete="username"` and the account's username, and the new password fields with `autocomplete="new-password"`. - [ ] `login-config-totp` and the recovery-codes page: show which account is being set up. Step order (password before TOTP) is fixed in the realm with required-action priorities.
Upphovsperson
Ägare

Decision for the Keycloakify theme:

  • Base it on the Keycloakify shadcn/ui + Tailwind starter: https://docs.keycloakify.dev/starter-themes/shadcn-ui-tailwind
  • Brand it to match the existing Bitborg pages (bitborg-web colours, type and layout), not the starter's defaults.
  • Reuse the identity service logo and icon from bitborg-infra assets/auth/ (bitborg-auth.svg, icon-oauth2.svg), renamed for "Bitborg-id" / "Bitborg ID".
  • Carry over what the interim FTL theme does: the labelled read-only username on the password and passkey enrolment pages, "Konto: " on TOTP, and the activation/update action email.
Decision for the Keycloakify theme: - Base it on the Keycloakify shadcn/ui + Tailwind starter: https://docs.keycloakify.dev/starter-themes/shadcn-ui-tailwind - Brand it to match the existing Bitborg pages (bitborg-web colours, type and layout), not the starter's defaults. - Reuse the identity service logo and icon from bitborg-infra `assets/auth/` (`bitborg-auth.svg`, `icon-oauth2.svg`), renamed for "Bitborg-id" / "Bitborg ID". - Carry over what the interim FTL theme does: the labelled read-only username on the password and passkey enrolment pages, "Konto: <name>" on TOTP, and the activation/update action email.
supernaut refererade till detta ärende från en incheckning 2026-10-10 13:20:29 +00:00
supernaut refererade till detta ärende från en incheckning 2026-10-10 16:28:52 +00:00
Upphovsperson
Ägare

Status 2026-10-12: none of the five boxes is done. The repo has only a minimal FreeMarker theme with parent=keycloak.v2 (login and email). PRs #9, #10 and #14 fixed single screens and the activation and migration mails. Keycloakify is not in use yet. Keeping this open.

Status 2026-10-12: none of the five boxes is done. The repo has only a minimal FreeMarker theme with `parent=keycloak.v2` (login and email). PRs #9, #10 and #14 fixed single screens and the activation and migration mails. Keycloakify is not in use yet. Keeping this open.
Upphovsperson
Ägare

Keycloakify facts, checked 2026-10-08.

Tool

  • Version 11.16.1, MIT. Supports Keycloak 11 to 26. Themes built before 26 must be rebuilt for 26.
  • Theme types: login, account, email, admin.
  • Proposal: multi-page account theme, so login and account share one look and one i18n file.

Email

  • Native FreeMarker via npx keycloakify initialize-email-theme.
  • Proposal: use this, not keycloakify-emails, to keep dependencies down.

i18n

  • withCustomTranslations({ sv: { … } }) in src/login/i18n.ts, inline only.
  • Find a key by the data-kc-msg attribute in the page source.

Build

  • npm run build-keycloak-theme writes JARs to dist_keycloak/. Needs Maven and a JDK.
  • keycloakVersionTargets limits the output to the 26+ JAR.

Deploy

  • Put the JAR in /opt/keycloak/providers, then run kc.sh build.
  • With start --optimized the JAR is baked into the image.

Dev loop

  • Storybook: npx keycloakify add-story.
  • npx keycloakify start-keycloak (Docker; Podman untested).

Upgrades

  • Bump, rebuild, test. Diff ejected pages against a fresh eject.
  • Keycloak 26.8.0 redesigned identity-provider buttons. We configure none.
Keycloakify facts, checked 2026-10-08. **Tool** - Version 11.16.1, MIT. Supports Keycloak 11 to 26. Themes built before 26 must be rebuilt for 26. - Theme types: login, account, email, admin. - Proposal: multi-page account theme, so login and account share one look and one i18n file. **Email** - Native FreeMarker via `npx keycloakify initialize-email-theme`. - Proposal: use this, not `keycloakify-emails`, to keep dependencies down. **i18n** - `withCustomTranslations({ sv: { … } })` in `src/login/i18n.ts`, inline only. - Find a key by the `data-kc-msg` attribute in the page source. **Build** - `npm run build-keycloak-theme` writes JARs to `dist_keycloak/`. Needs Maven and a JDK. - `keycloakVersionTargets` limits the output to the 26+ JAR. **Deploy** - Put the JAR in `/opt/keycloak/providers`, then run `kc.sh build`. - With `start --optimized` the JAR is baked into the image. **Dev loop** - Storybook: `npx keycloakify add-story`. - `npx keycloakify start-keycloak` (Docker; Podman untested). **Upgrades** - Bump, rebuild, test. Diff ejected pages against a fresh eject. - Keycloak 26.8.0 redesigned identity-provider buttons. We configure none.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-keycloak#2
Ingen beskrivning angiven.