Skip to content
cccskills
FreePublished on GitHub

authentication-portal-themes

Build, customize, or update AuthCrunch authentication portal themes using Go HTML templates, CSS, and SVG branding. Use for responsive layouts, login QR controls, cross-device approval views, filesystem overrides, UI/static-asset configuration, internationalization, and OIDC page styling. The embedded React profile application has a separate build.

The English summary is being prepared. Showing the original description.

See how to install

Files included (9)

  • SKILL.md8.3 KB
  • agents/openai.yaml350 B
  • references/basic-theme.md22.9 KB
  • references/brand-assets-and-color.md19.2 KB
  • references/configuration.md9.7 KB
  • references/cross-device.md8.7 KB
  • references/design-and-validation.md11.2 KB
  • references/internationalization.md7.1 KB
  • references/template-contracts.md18.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Authentication Portal Themes

For an application theme, create deployable files in its theme directory, with the user's branding, working portal flows, and matching configuration. For library UI work, update the built-in templates and their rendering/browser tests. Start from the templates for the AuthCrunch version the application runs. Use an existing custom theme as a design reference, then carry its styling onto those templates. Filesystem overrides do not inherit later upstream changes.

Choose the Customization Surface

Read basic theme branding for the built-in blue palette, shared CSS variables, logo/icon/banner/background replacements, and tested configuration examples. Use it for defaults or CSS-only branding before copying templates.

For sizing, alignment, gaps, corners, and hover/focus changes, read the component contract. For phone-only work, use the phone layout and verify the tablet/desktop boundary. For QR behavior, use the login QR contract; styling must preserve the active login view, entered values, and keyboard focus.

For cross-device request, continuation, approval, and terminal views, read the cross-device presentation contract. It defines the matching-code hierarchy, copy fallback, action layout, and Chrome captures; the ordinary login QR bookmark remains a separate view.

  • For colors, typography, spacing, logo, icon, banner, and background, prefer shared CSS variables and existing UI/static-asset settings. Keep the built-in markup when it meets the request.
  • For different page structure, additional metadata, or custom favicon URLs, copy and override the affected templates. Unspecified aliases keep their built-in templates. A complete theme should account for every page the application exposes, including session continuation, logout confirmation, and the OIDC consent, form-post continuation, and error views when enabled.
  • Keep application themes in the consuming application. Editing pkg/authn/ui/page_templates/basic changes the library's default UI and is appropriate only when that is the requested scope.

The React profile app under pkg/authn/ui/profile is a separate asset surface; portal template overrides do not rebuild or restyle it automatically.

For language settings, translated templates/scripts, RTL layout and multilingual acceptance tests, read internationalization.

The connected_accounts template presents optional external-account connection, fresh local login and confirmation. Its connected_accounts.css uses shared brand variables; both inputs are server-owned and HTML-escaped. See the connection contract for protocol and lifecycle requirements.

Build the Theme

  1. Inspect the application's AuthCrunch version, current UI configuration, portal mount, theme directory, brand assets, and exposed flows. Infer visual choices from supplied references; ask only for missing choices that affect the result. Do not assume a particular company, realm, hostname, or palette.
  2. Read configuration.md when selecting overrides, wiring files, or debugging asset URLs. The registered theme remains basic; a custom folder name is not a new value for ui.theme.
  3. Before changing markup, read template-contracts.md and inspect the corresponding current template, handler, and scripts. Keep authentication forms, conditional views, navigation, translations, and script hooks intact.
  4. Use brand-assets-and-color.md for suggested logo/banner/background sizes, formats, composition, and color palettes. Use design-and-validation.md for page layout, CSS ordering, and validation. Produce shared styles plus page-specific adjustments instead of forcing a narrow login card onto registration forms or identity/SSO tables.
  5. Deliver the templates/assets and the exact UI configuration needed to load them. Report which aliases changed, which use defaults, the required runtime paths, and which rendering/browser checks ran.

Compatibility Essentials

Use Go html/template, not a frontend component language. Each custom file is parsed independently; shared template partials require preprocessing into each file. The repository supplies pathjoin and brsplitline, not Sprig or an include function. Preserve contextual escaping.

Build local navigation and asset paths from .ActionEndpoint, which is the portal mount, not the login URL. Keep .LogoURL and .LogoDescription useful when the theme is meant to accept configuration. Do not embed credentials, application-specific redirect scripts, or hardcoded user/role lists in a theme.

Preserve the current portal refresh script and the session template's DOM and script attributes. The session response blocks inline CSS/JavaScript: load theme CSS from the same origin. Do not relax its Content Security Policy to reuse an inline style block. Use refresh-token-transports to change session continuation or refresh behavior; visual changes alone do not require redesigning the refresh flow.

For OIDC styling, read the OIDC browser page contract before copying the oidc alias. It owns .Data.oidc, consent/continuation form semantics, response policies, and browser validation. These pages use their own .oidc-* styles; the theme's .app-* overrides alone will not style them. OIDC and ordinary portal views share the --brand-* tokens in basic.css. Form-post continuation and the portal refresh session page are separate flows.

Materialize tab fragments resolve directly to decoded element IDs through M.getHashElement; do not reinterpret them as generic selectors. Preserve the M.escapeHash compatibility helper's CSS escaping contract. Keep the readable and minified Materialize assets synchronized and verify the served minified asset in the MFA DOM Chrome fixture when changing this boundary.

Regenerate the paired asset with the pinned minifier:

npx -y terser@5.51.2 pkg/authn/ui/core/materialize-css/js/materialize.js \
  --compress --mangle \
  --output pkg/authn/ui/core/materialize-css/js/materialize.min.js

Source of Truth

Paths below are relative to the repository root:

  • pkg/authn/ui/params.go: UI configuration fields.
  • pkg/authn/portal.go, configureUserInterface: default and override loading.
  • pkg/authn/ui/ui.go: template functions, Args, BaseURL, and rendering.
  • pkg/authn/ui/page_templates/basic/: current template baselines.
  • pkg/authn/ui/core/css/ and pkg/authn/ui/core/js/: styles and DOM consumers.
  • pkg/authn/ui/core/js/login.js and pkg/authn/respond_qrcode.go: login QR view transitions and the generated code endpoint, separate from brand assets.
  • pkg/authn/ui/core/css/basic.css and pkg/authn/ui/core/images/: common branding tokens, vector logo, favicon, decorative banner, and background.
  • assets/branding/palette.json and assets/branding/soft-square.svg: default colors and source geometry; make brand-assets regenerates the related SVGs, CSS colors, and profile metadata. make brand-assets-check checks drift.
  • pkg/authn/handle_http_static.go: public asset routing and caching.
  • pkg/authn/handle_http_session.go: session rendering and response policy.
  • pkg/authn/oidc_ui.go: OIDC page snapshots passed to the portal UI factory; pkg/oidc/pages.go owns the response policies and standalone fallback.

Use the application's pinned dependency when it differs from this checkout. Recompare overrides with that baseline on upgrades; do not copy an older theme's functional omissions into a new theme.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

authdb

Free

Maintain the standalone cmd/authdb server, pkg/httpserver listener and portal routing, HTTP configuration parser, TLS, shutdown, executable tests, and deployment guidance. Use authdbctl for the management client.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

Maintain cmd/authdbctl commands, flags, configuration, terminal input, management retries, output, and executable E2E tests. Use authentication-client for the reusable portal login protocol.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

Maintain or embed pkg/authclient for portal login, password/TOTP and API-key authentication, native credential transport, configuration parsing, and credential files. Covers authdbctl login wiring; management commands and the admin API have separate owners.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

Maintain conditional authentication challenge policies, reusable authchal and user-transform FromDirectives parsers, safe claim substitution, GitHub ID/organization transforms, registered-factor inventory, passwordless WebAuthn selection, verified AMR access claims, and policy revalidation across portal login, refresh, OIDC, and direct authentication.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

Maintain portal cookie configuration, reusable cookie directive parsing, common prefixes and explicit names, domain attributes, factory issuance/deletion, and cookie interoperability with OIDC, refresh, OAuth, and gatekeepers.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

Maintain optional cross-device portal login, its directive parser, QR and polling UI, approving-browser binding, single-use transfers, MFA and provider evidence, logout invalidation, and TLS/browser tests.

The English summary is being prepared. Showing the original description.

greenpau/go-authcrunch60Updated Oct 20, 2026

See all skills by greenpau

Report a problem with this skill