GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - p2-inc/keycloak-theme-template: Starter for building a Keycloak theme

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
examples/email
examples/email
 
 
src/main/resources
src/main/resources
 
 
.gitignore
.gitignore
 
 
COPYING
COPYING
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
pom.xml
pom.xml
 
 

Repository files navigation

license docs

📚 Documentation • 🚀 Hosted Keycloak • 🤖 Keycloak Skills • 💬 Support

Tip

Run this in our cloud, no setup needed. Phase Two hosts Keycloak with all of our extensions built in. Try it free with your own cluster →

Using a coding agent? Add the Phase Two Keycloak skills (launch post) to Claude Code, Cursor or Codex so your agent can set up passwordless login, SSO, organizations and clusters for you:

# Install the skills (connects to our hosted MCP server)
claude plugin marketplace add p2-inc/keycloak-skills
claude plugin install phasetwo@keycloak-skills
# Or connect to the MCP server directly
claude mcp add --transport http keycloak https://mcp.phasetwo.io/mcp

This repository contains examples for developing a Keycloak login theme locally. You can use the examples directly, customize them and package them with the included Maven project, or use the CSS directly if you are using the Phase Two Themes extension.

Sample themes

The 3 example CSS themes that can be be used in Phase Two's enhanced Keycloak without installing a custom library:

  • Consumer consumer/login.css
  • Enterprise enterprise/login.css
  • SaaS saas/login.css

Look at the article for more information on using the CSS directly with the Phase Two Themes extension.

Install them in the Phase Two Admin UI console by navigating to the Styles section and selecting the Login tab. Paste the style into the CSS field and click Save. Screenshot from 2023-01-12 21-20-30

You must have the Attributes login theme selected in Realm settings -> Themes for the changes to take effect. Screenshot from 2023-01-12 21-18-58

Keycloak theme template

You can also use these as base template for developing a Keycloak theme locally.

Developing custom Keycloak themes

  • Create a folder for your custom theme within the src/main/resources/themes directory, if one does not already exist.
  • Then add a subdirectory for the theme type (e.g. admin, login, etc.).
  • Modify any of the files within your custom theme directory. Assuming you are extending the base or keycloak theme, you only need to override the files you want to change.
  • To easily iterate without having to restart the server every time, load keycloak using start-dev with the included docker-compose file caching off: docker compose up

Testing your theme

  • Login to the admin console at http://localhost:8080/auth/admin with admin:admin
  • Go into Realm Settings->Themes and select the theme you are working on (e.g. Login->example)

Packaging the theme for deployment

  • Run mvn package to build a jar that can be placed in the provider (Quarkus) or standalone/deployments (Wildfly) directory of your Keycloak installation.

About

Starter for building a Keycloak theme

phasetwo.io

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

48 stars

Watchers

2 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.